From 8727767816ce8fa59d4078e19aa53b51fd2cd942 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Tue, 22 Dec 2020 08:44:47 -0500 Subject: [PATCH] Adding more CI tests. --- .github/workflows/mingw-ci.yml | 49 +++++++++++++++++++++++ .github/workflows/mingw64-ci.yml | 49 +++++++++++++++++++++++ .github/workflows/vs16-clang-ninja-ci.yml | 25 ++++++++++++ 3 files changed, 123 insertions(+) create mode 100644 .github/workflows/mingw-ci.yml create mode 100644 .github/workflows/mingw64-ci.yml create mode 100644 .github/workflows/vs16-clang-ninja-ci.yml diff --git a/.github/workflows/mingw-ci.yml b/.github/workflows/mingw-ci.yml new file mode 100644 index 0000000..288d13c --- /dev/null +++ b/.github/workflows/mingw-ci.yml @@ -0,0 +1,49 @@ +name: MinGW32-CI + +on: [push, pull_request] + +# Important: scoop will either install 32-bit GCC or 64-bit GCC, not both. + +# It is important to build static libraries because cmake is not smart enough under Windows/mingw to take care of the path. So +# with a dynamic library, you could get failures due to the fact that the EXE can't find its DLL. + +jobs: + ci: + name: windows-gcc + runs-on: windows-2016 + + env: + CMAKE_GENERATOR: Ninja + CC: gcc + CXX: g++ + + steps: # To reproduce what is below, start a powershell with administrative rights, using scoop *is* a good idea + - uses: actions/checkout@v2 + + - uses: actions/cache@v2 # we cache the scoop setup with 32-bit GCC + id: cache + with: + path: | + C:\ProgramData\scoop + key: scoop32 # static key: should be good forever + - name: Setup Windows # This should almost never run if the cache works. + if: steps.cache.outputs.cache-hit != 'true' + shell: powershell + run: | + Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh') + scoop install sudo --global + sudo scoop install git --global + sudo scoop install ninja --global + sudo scoop install cmake --global + sudo scoop install gcc --arch 32bit --global + $env:path + Write-Host 'Everything has been installed, you are good!' + - name: Build and Test 32-bit x86 + shell: powershell + run: | + $ENV:PATH="C:\ProgramData\scoop\shims;C:\ProgramData\scoop\apps\gcc\current\bin;C:\ProgramData\scoop\apps\ninja\current;$ENV:PATH" + mkdir build32 + cd build32 + cmake -DFASTFLOAT_TEST=ON .. + cmake --build . --verbose + ctest -j4 --output-on-failure \ No newline at end of file diff --git a/.github/workflows/mingw64-ci.yml b/.github/workflows/mingw64-ci.yml new file mode 100644 index 0000000..5795bee --- /dev/null +++ b/.github/workflows/mingw64-ci.yml @@ -0,0 +1,49 @@ +name: MinGW64-CI + +on: [push, pull_request] + +# Important: scoop will either install 32-bit GCC or 64-bit GCC, not both. + +# It is important to build static libraries because cmake is not smart enough under Windows/mingw to take care of the path. So +# with a dynamic library, you could get failures due to the fact that the EXE can't find its DLL. + +jobs: + ci: + name: windows-gcc + runs-on: windows-2016 + + env: + CMAKE_GENERATOR: Ninja + CC: gcc + CXX: g++ + + steps: # To reproduce what is below, start a powershell with administrative rights, using scoop *is* a good idea + - uses: actions/checkout@v2 + + - uses: actions/cache@v2 # we cache the scoop setup with 64-bit GCC + id: cache + with: + path: | + C:\ProgramData\scoop + key: scoop64 # static key: should be good forever + - name: Setup Windows # This should almost never run if the cache works. + if: steps.cache.outputs.cache-hit != 'true' + shell: powershell + run: | + Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh') + scoop install sudo --global + sudo scoop install git --global + sudo scoop install ninja --global + sudo scoop install cmake --global + sudo scoop install gcc --arch 64bit --global + $env:path + Write-Host 'Everything has been installed, you are good!' + - name: Build and Test 64-bit x64 + shell: powershell + run: | + $ENV:PATH="C:\ProgramData\scoop\shims;C:\ProgramData\scoop\apps\gcc\current\bin;C:\ProgramData\scoop\apps\ninja\current;$ENV:PATH" + mkdir build64 + cd build64 + cmake -DFASTFLOAT_TEST=ON .. + cmake --build . --verbose + ctest -j4 --output-on-failure \ No newline at end of file diff --git a/.github/workflows/vs16-clang-ninja-ci.yml b/.github/workflows/vs16-clang-ninja-ci.yml new file mode 100644 index 0000000..e35b3fa --- /dev/null +++ b/.github/workflows/vs16-clang-ninja-ci.yml @@ -0,0 +1,25 @@ +name: VS16-Ninja-CI + +on: [push, pull_request] + +jobs: + ci: + name: windows-vs16 + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - name: 'Run CMake with VS16' + uses: lukka/run-cmake@v2 + with: + cmakeListsOrSettingsJson: CMakeListsTxtAdvanced + cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt' + buildDirectory: "${{ github.workspace }}/../../_temp/windows" + cmakeBuildType: Release + buildWithCMake: true + cmakeGenerator: VS16Win64 + cmakeAppendedArgs: -G Ninja -DFASTFLOAT_TEST=ON + buildWithCMakeArgs: --config Release + + - name: 'Run CTest' + run: ctest -C Release --output-on-failure + working-directory: "${{ github.workspace }}/../../_temp/windows" \ No newline at end of file