Also test using MSVC compiler #58
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: CI testing | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
linux-build: | |
name: 'Linux ${{matrix.cc.cc}}-${{ matrix.cc.v}} ${{matrix.build_type}}' | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: | |
- Release | |
- Debug | |
cc: | |
- { cc: gcc, v: 9, cxx: g++} | |
- { cc: gcc, v: 12, cxx: g++} | |
- { cc: clang, v: 11, cxx: clang++ } | |
- { cc: clang, v: 15, cxx: clang++ } | |
env: | |
cc: ${{matrix.cc.cc}}-${{matrix.cc.v}} | |
cxx: ${{matrix.cc.cxx}}-${{matrix.cc.v}} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install packages | |
run: | | |
sudo apt update | |
sudo apt install cmake cmake-data build-essential | |
- name: Install CLang | |
if: matrix.cc.cc == 'clang' | |
run: | | |
sudo apt install clang-${{matrix.cc.v}} | |
- name: Install GCC | |
if: matrix.cc.cc == 'gcc' | |
run: | | |
sudo apt install gcc-${{matrix.cc.v}} g++-${{matrix.cc.v}} | |
- name: CMake Build | |
run: | | |
export CC=${{env.cc}} | |
export CXX=${{env.cxx}} | |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DLACE_BUILD_BENCHMARKS=ON | |
cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
run: | | |
ctest -C ${{ matrix.build_type }} -VV --timeout 30 | |
- name: Performance | |
working-directory: ${{github.workspace}}/build | |
run: | | |
benchmarks/fib-lace -w 1 38 | |
benchmarks/fib-lace -w 2 38 | |
benchmarks/pi-lace -w 1 100000000 | |
benchmarks/pi-lace -w 2 100000000 | |
benchmarks/queens-lace -w 1 12 | |
benchmarks/queens-lace -w 2 12 | |
benchmarks/matmul-lace -w 1 1024 | |
benchmarks/matmul-lace -w 2 1024 | |
benchmarks/uts-lace -w 1 -t 0 -b 2000 -q 0.124875 -m 8 -r 42 | |
benchmarks/uts-lace -w 2 -t 0 -b 2000 -q 0.124875 -m 8 -r 42 | |
macos-build: | |
name: 'OSX ${{matrix.cc.cc}}@${{matrix.cc.v || matrix.cc.xcode}} ${{matrix.build_type}}' | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: | |
- Release | |
- Debug | |
cc: | |
- { cc: gcc, v: 7, cxx: g++, xcode: latest } | |
- { cc: gcc, v: 11, cxx: g++, xcode: latest } | |
- { cc: clang, cxx: clang++, xcode: 10.0 } | |
- { cc: clang, cxx: clang++, xcode: 11.0 } | |
- { cc: clang, cxx: clang++, xcode: 12.0 } | |
env: | |
cc: ${{matrix.cc.cc}}-${{matrix.cc.v}} | |
cxx: ${{matrix.cc.cxx}}-${{matrix.cc.v}} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install packages | |
run: | | |
brew update | |
if ["${{matrix.cc.cc}}" == "gcc"]; | |
then | |
brew install ${{matrix.cc.cc}}@${{matrix.cc.v}} | |
fi | |
brew install gawk | |
- name: CMake Build | |
run: | | |
if [ "${{ matrix.cc.cc }}" == "gcc" ] ; | |
then | |
export CC=/usr/bin/${{matrix.cc.cc}} | |
export CXX=/usr/bin/${{matrix.cc.cxx}} | |
else | |
export CC=${{matrix.cc.cc}} | |
export CXX=${{matrix.cc.cxx}} | |
fi | |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DLACE_BUILD_BENCHMARKS=ON | |
cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
run: | | |
ctest -C ${{ matrix.build_type }} -VV --timeout 30 | |
- name: Performance | |
working-directory: ${{github.workspace}}/build | |
run: | | |
benchmarks/fib-lace -w 1 38 | |
benchmarks/fib-lace -w 2 38 | |
benchmarks/pi-lace -w 1 100000000 | |
benchmarks/pi-lace -w 2 100000000 | |
benchmarks/queens-lace -w 1 12 | |
benchmarks/queens-lace -w 2 12 | |
benchmarks/matmul-lace -w 1 1024 | |
benchmarks/matmul-lace -w 2 1024 | |
benchmarks/uts-lace -w 1 -t 0 -b 2000 -q 0.124875 -m 8 -r 42 | |
benchmarks/uts-lace -w 2 -t 0 -b 2000 -q 0.124875 -m 8 -r 42 | |
windows-build: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- { icon: '⬛', sys: mingw32 } | |
- { icon: '🟦', sys: mingw64 } | |
- { icon: '🟨', sys: ucrt64 } | |
- { icon: '🟧', sys: clang64 } | |
name: 🚧${{ matrix.icon }} ${{ matrix.sys }} | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- name: '🧰 Checkout' | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: '${{ matrix.icon }} Setup MSYS2' | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ${{matrix.sys}} | |
update: true | |
install: >- | |
git | |
make | |
pacboy: >- | |
toolchain:p | |
cmake:p | |
ninja:p | |
- name: '🚧 Build TOOL' | |
run: | | |
cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Release | |
cmake --build build | |
- name: 'Test' | |
working-directory: ${{github.workspace}}/build | |
run: | | |
ctest -C ${{ matrix.build_type }} -VV --timeout 30 | |
- name: 'Performance' | |
working-directory: ${{github.workspace}}/build | |
run: | | |
benchmarks/fib-lace -w 1 38 | |
benchmarks/fib-lace -w 2 38 | |
benchmarks/pi-lace -w 1 100000000 | |
benchmarks/pi-lace -w 2 100000000 | |
benchmarks/queens-lace -w 1 12 | |
benchmarks/queens-lace -w 2 12 | |
benchmarks/matmul-lace -w 1 1024 | |
benchmarks/matmul-lace -w 2 1024 | |
benchmarks/uts-lace -w 1 -t 0 -b 2000 -q 0.124875 -m 8 -r 42 | |
benchmarks/uts-lace -w 2 -t 0 -b 2000 -q 0.124875 -m 8 -r 42 | |
msvc-build: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
name: MSVC build | |
steps: | |
- name: '🧰 Checkout' | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: 'Setup MSVC' | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: '🚧 Build TOOL' | |
run: | | |
cmake -G "NMake MAkefiles" -B build -DCMAKE_BUILD_TYPE=Release | |
# cmake --build build | |
nmake | |
- name: 'Test' | |
working-directory: ${{github.workspace}}/build | |
run: | | |
ctest -C ${{ matrix.build_type }} -VV --timeout 30 | |
- name: 'Performance' | |
working-directory: ${{github.workspace}}/build | |
run: | | |
benchmarks/fib-lace -w 1 38 | |
benchmarks/fib-lace -w 2 38 | |
benchmarks/pi-lace -w 1 100000000 | |
benchmarks/pi-lace -w 2 100000000 | |
benchmarks/queens-lace -w 1 12 | |
benchmarks/queens-lace -w 2 12 | |
benchmarks/matmul-lace -w 1 1024 | |
benchmarks/matmul-lace -w 2 1024 | |
benchmarks/uts-lace -w 1 -t 0 -b 2000 -q 0.124875 -m 8 -r 42 | |
benchmarks/uts-lace -w 2 -t 0 -b 2000 -q 0.124875 -m 8 -r 42 |