1+ name : PR Check
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - master
7+
8+ jobs :
9+ build :
10+ runs-on : ${{ matrix.os }}
11+ strategy :
12+ fail-fast : false
13+ matrix :
14+ include :
15+ - { os: ubuntu-latest, target: linux, platform: linux-x64,}
16+ - { os: macos-latest, target: darwin, platform: darwin-x64,}
17+ - { os: macos-latest, target: darwin, platform: darwin-arm64}
18+ - { os: windows-latest, target: windows, platform: win32-x64 }
19+ steps :
20+ - uses : actions/checkout@v2
21+ - name : install gcc 11
22+ if : startsWith(matrix.os, 'ubuntu')
23+ run : |
24+ sudo apt-get install -y gcc-11 g++-11
25+ echo "CC=gcc-11" >> $GITHUB_ENV
26+ echo "CXX=g++-11" >> $GITHUB_ENV
27+ - name : Build-Windows
28+ if : startsWith(matrix.os, 'windows')
29+ run : |
30+ mkdir build
31+ cd build
32+ cmake .. -DCMAKE_USER_MAKE_RULES_OVERRIDE="${{ github.workspace }}/cmake/flags_override.cmake"
33+ cmake --build . --config Release
34+ ctest -V -C Release
35+ cmake --install . --config Release --prefix ${{ github.workspace }}/artifact/
36+ - name : Build-Linux
37+ if : startsWith(matrix.os, 'ubuntu')
38+ run : |
39+ mkdir build
40+ cd build
41+ cmake ..
42+ cmake --build . --config Release
43+ ctest -V -C Release
44+ cmake --install . --config Release --prefix ${{ github.workspace }}/artifact/
45+ - name : Build-macosx
46+ if : startsWith(matrix.os, 'macos')
47+ run : |
48+ mkdir build
49+ cd build
50+ if [[ "${{ matrix.platform }}" = darwin-arm64 ]]; then
51+ cmake .. -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
52+ else
53+ cmake ..
54+ fi
55+ cmake --build . --config Release
56+ ctest -V -C Release
57+ cmake --install . --config Release --prefix ${{ github.workspace }}/artifact/
58+
59+ - name : Upload
60+ uses : actions/upload-artifact@v2
61+ with :
62+ name : ${{ matrix.platform }}
63+ path : ${{ github.workspace }}/artifact/
64+
0 commit comments