Update c-cpp.yml #41
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: C/C++ CI | |
on: | |
push: | |
branches: [ tests, function_feature, move_feature, future_feature ] | |
pull_request: | |
branches: [ tests, function_feature, move_feature, future_feature ] | |
jobs: | |
unix: | |
#if: ${{ false }} # disable for now | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: macos-latest | |
name: MacOS clang++ | |
TARGET: x86_64-apple-darwin | |
COMPILER: clang | |
LINKER: clang | |
LIBRARY_PATH: $LIBRARY_PATH | |
CPP_COMPILER: clang++ | |
BUILD_SCRIPT: build_tests.sh | |
RUN_SCRIPT: run_tests.sh | |
SETUP_SCRIPT: | | |
chmod a+rwx ./build_tests.sh | |
chmod a+rwx ./run_tests.sh | |
- os: ubuntu-latest | |
name: Ubuntu g++5 | |
TARGET: armv7-unknown-linux-musleabihf | |
COMPILER: arm-linux-gnueabihf-gcc-5 | |
LINKER: gcc-5-arm-linux-gnueabihf | |
LIBRARY_PATH: $LIBRARY_PATH | |
CPP_COMPILER: g++ | |
BUILD_SCRIPT: build_tests.sh | |
RUN_SCRIPT: run_tests.sh | |
SETUP_SCRIPT: | | |
chmod a+rwx ./build_tests.sh | |
chmod a+rwx ./run_tests.sh | |
- os: ubuntu-latest | |
name: Ubuntu g++ latest | |
TARGET: x86_64-unknown-linux-musl | |
COMPILER: gcc | |
LINKER: gcc | |
LIBRARY_PATH: $LIBRARY_PATH | |
CPP_COMPILER: g++ | |
BUILD_SCRIPT: build_tests.sh | |
RUN_SCRIPT: run_tests.sh | |
SETUP_SCRIPT: | | |
chmod a+rwx ./build_tests.sh | |
chmod a+rwx ./run_tests.sh | |
- os: ubuntu-20.04 | |
name: Ubuntu 20.04 g++3.4 | |
COMPILER: gcc | |
LINKER: gcc | |
CPP_COMPILER: g++-3.4 | |
LIBRARY_PATH: /usr/lib/x86_64-linux-gnu:$LIBRARY_PATH | |
BUILD_SCRIPT: build_tests.sh | |
RUN_SCRIPT: run_tests.sh | |
SETUP_SCRIPT: | | |
echo "deb [trusted=yes] http://old-releases.ubuntu.com/ubuntu/ hardy universe" | sudo tee -a /etc/apt/sources.list | |
echo "deb-src [trusted=yes] http://old-releases.ubuntu.com/ubuntu/ hardy universe" | sudo tee -a /etc/apt/sources.list | |
#echo "deb http://snapshot.debian.org/archive/debian/20070730T000000Z/ lenny main" | sudo tee -a /etc/apt/sources.list | |
#echo "deb-src http://snapshot.debian.org/archive/debian/20070730T000000Z/ lenny main" | sudo tee -a /etc/apt/sources.list | |
#echo "deb http://snapshot.debian.org/archive/debian-security/20070730T000000Z/ lenny/updates main" | sudo tee -a /etc/apt/sources.list | |
#echo "deb-src http://snapshot.debian.org/archive/debian-security/20070730T000000Z/ lenny/updates main" | sudo tee -a /etc/apt/sources.list | |
sudo apt-get update | |
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install gcc-3.4 g++-3.4 gcc-multilib g++-multilib | |
dpkg --list | grep compiler | |
sudo /sbin/ldconfig -p | grep libgcc | |
sudo ln -s /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib/libgcc_s.so.1 | |
chmod a+rwx ./build_tests.sh | |
chmod a+rwx ./run_tests.sh | |
- os: ubuntu-20.04 | |
name: Ubuntu 20.04 g++4.4 | |
COMPILER: gcc | |
LINKER: gcc | |
CPP_COMPILER: g++-4.4 | |
LIBRARY_PATH: $LIBRARY_PATH | |
BUILD_SCRIPT: build_tests.sh | |
RUN_SCRIPT: run_tests.sh | |
SETUP_SCRIPT: | | |
echo "deb [trusted=yes] http://old-releases.ubuntu.com/ubuntu/ hardy universe" | sudo tee -a /etc/apt/sources.list | |
echo "deb-src [trusted=yes] http://old-releases.ubuntu.com/ubuntu/ hardy universe" | sudo tee -a /etc/apt/sources.list | |
echo "deb [trusted=yes] http://snapshot.debian.org/archive/debian/20070730T000000Z/ lenny main" | sudo tee -a /etc/apt/sources.list | |
echo "deb-src [trusted=yes] http://snapshot.debian.org/archive/debian/20070730T000000Z/ lenny main" | sudo tee -a /etc/apt/sources.list | |
echo "deb [trusted=yes] http://snapshot.debian.org/archive/debian-security/20070730T000000Z/ lenny/updates main" | sudo tee -a /etc/apt/sources.list | |
echo "deb-src [trusted=yes] http://snapshot.debian.org/archive/debian-security/20070730T000000Z/ lenny/updates main" | sudo tee -a /etc/apt/sources.list | |
sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test" | |
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ trusty main' | |
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ trusty universe' | |
sudo apt-get update | |
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install g++-4.4 | |
dpkg --list | grep compiler | |
#sudo /sbin/ldconfig -p | grep libgcc | |
#sudo ln -s /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib/libgcc_s.so.1 | |
chmod a+rwx ./build_tests.sh | |
chmod a+rwx ./run_tests.sh | |
steps: | |
- uses: actions/checkout@v2 | |
- name: setup enviroment | |
run: ${{matrix.SETUP_SCRIPT}} | |
- name: build tests | |
env: | |
COMPILER: ${{ matrix.CPP_COMPILER }} | |
LIBRARY_PATH: ${{ matrix.LIBRARY_PATH }} | |
run: | | |
./${{ matrix.BUILD_SCRIPT }} | |
- name: run tests | |
run: | | |
./${{ matrix.RUN_SCRIPT }} | |
windows: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: windows-latest | |
name: Windows cl x32 | |
COMPILER: cl | |
LINKER: ilink | |
CPP_COMPILER: cl | |
LIBRARY_PATH: "" | |
BUILD_SCRIPT: ~build_tests.bat | |
RUN_SCRIPT: run_tests.bat | |
SETUP_SCRIPT: | | |
set MSVS_VSVARS_PATH="C:\PROGRA~2\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat" | |
if exist %MSVS_VSVARS_PATH% ( | |
echo %MSVS_VSVARS_PATH% | |
) else ( | |
vswhere -latest | |
set MSVS_VSVARS_PATH="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat" | |
) | |
echo %MSVS_VSVARS_PATH% | |
if exist %MSVS_VSVARS_PATH% ( | |
echo call %MSVS_VSVARS_PATH% > ~build_tests.bat | |
cat build_tests.bat >> ~build_tests.bat | |
) else ( | |
echo "cannot find %MSVS_VSVARS_PATH%" | |
exit /B 1 | |
) | |
- os: windows-latest | |
name: Windows cl x32 cpp98 ts | |
COMPILER: cl | |
LINKER: ilink | |
CPP_COMPILER: cl | |
LIBRARY_PATH: "" | |
BUILD_SCRIPT: ~build_tests.bat | |
RUN_SCRIPT: run_tests.bat | |
SETUP_SCRIPT: | | |
set MSVS_VSVARS_PATH="C:\PROGRA~2\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat" | |
if exist %MSVS_VSVARS_PATH% ( | |
echo %MSVS_VSVARS_PATH% | |
) else ( | |
vswhere -latest | |
set MSVS_VSVARS_PATH="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat" | |
) | |
echo %MSVS_VSVARS_PATH% | |
if exist %MSVS_VSVARS_PATH% ( | |
echo call %MSVS_VSVARS_PATH% > ~build_tests.bat | |
echo set CL_GLOBAL_DEFINES=-D TESTSUIT_USING_CPP98 >> ~build_tests.bat | |
cat build_tests.bat >> ~build_tests.bat | |
) else ( | |
echo "cannot find %MSVS_VSVARS_PATH%" | |
exit /B 1 | |
) | |
- os: windows-latest | |
name: Windows cl x64 | |
COMPILER: cl | |
LINKER: ilink | |
CPP_COMPILER: cl | |
LIBRARY_PATH: "" | |
BUILD_SCRIPT: ~build_tests.bat | |
RUN_SCRIPT: run_tests.bat | |
SETUP_SCRIPT: | | |
set MSVS_VSVARS_PATH="C:\PROGRA~2\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
if exist %MSVS_VSVARS_PATH% ( | |
echo %MSVS_VSVARS_PATH% | |
) else ( | |
vswhere -latest | |
set MSVS_VSVARS_PATH="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
) | |
echo %MSVS_VSVARS_PATH% | |
if exist %MSVS_VSVARS_PATH% ( | |
echo call %MSVS_VSVARS_PATH% > ~build_tests.bat | |
cat build_tests.bat >> ~build_tests.bat | |
) else ( | |
echo "cannot find %MSVS_VSVARS_PATH%" | |
exit /B 1 | |
) | |
- os: windows-latest | |
name: Windows cl x64 cpp98 ts | |
COMPILER: cl | |
LINKER: ilink | |
CPP_COMPILER: cl | |
LIBRARY_PATH: "" | |
BUILD_SCRIPT: ~build_tests.bat | |
RUN_SCRIPT: run_tests.bat | |
SETUP_SCRIPT: | | |
set MSVS_VSVARS_PATH="C:\PROGRA~2\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
if exist %MSVS_VSVARS_PATH% ( | |
echo %MSVS_VSVARS_PATH% | |
) else ( | |
vswhere -latest | |
set MSVS_VSVARS_PATH="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
) | |
echo %MSVS_VSVARS_PATH% | |
if exist %MSVS_VSVARS_PATH% ( | |
echo call %MSVS_VSVARS_PATH% > ~build_tests.bat | |
echo set CL_GLOBAL_DEFINES=-D TESTSUIT_USING_CPP98 >> ~build_tests.bat | |
cat build_tests.bat >> ~build_tests.bat | |
) else ( | |
echo "cannot find %MSVS_VSVARS_PATH%" | |
exit /B 1 | |
) | |
steps: | |
- uses: actions/checkout@v2 | |
- name: setup enviroment | |
run: | | |
git submodule update --init --recursive | |
${{matrix.SETUP_SCRIPT}} | |
shell: cmd | |
- name: build tests | |
env: | |
COMPILER: ${{ matrix.CPP_COMPILER }} | |
LIBRARY_PATH: ${{ matrix.LIBRARY_PATH }} | |
run: | | |
${{ matrix.BUILD_SCRIPT }} | |
shell: cmd | |
- name: run tests | |
run: | | |
${{ matrix.RUN_SCRIPT }} | |
shell: cmd |