1+ ---
12name : Build and Test
23
34on :
@@ -10,18 +11,21 @@ jobs:
1011 formatting :
1112 runs-on : ubuntu-latest
1213 steps :
13- - uses : actions/checkout@v2
14- - name : Formatting
15- run : find src include test -iregex '.*\.\(c\|h\|cpp\|hpp\|cc\|hh\|cxx\|hxx\)$' | xargs clang-format -n -Werror
14+ - uses : actions/checkout@v3
15+ - name : Formatting
16+ run : find src include test -iregex '.*\.\(c\|h\|cpp\|hpp\|cc\|hh\|cxx\|hxx\)$' | xargs clang-format -n -Werror
1617 build-linux :
1718 runs-on : ubuntu-latest
1819 env :
1920 TARGET : x86_64-linux
20- CMAKE_TOOLCHAIN_FILE : ${{ github.workspace }}/cmake/toolchain/${{ env.TARGET }}.cmake
2121 CMAKE_BUILD_TYPE : Debug
2222 CTEST_OUTPUT_ON_FAILURE : 1
2323 steps :
24- - uses : actions/checkout@v2
24+ - uses : actions/checkout@v3
25+ - name : Setup the toolchain
26+ run : |
27+ CMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/cmake/toolchain/${{ env.TARGET }}.cmake"
28+ echo "CMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE" >> $GITHUB_ENV
2529 - name : Build without getlibs
2630 run : |
2731 BUILD=build-$TARGET-$CMAKE_BUILD_TYPE
3135 - name : Get dependencies
3236 run : CMAKE_BUILD_TYPE=Release ./getlibs.sh $TARGET
3337 - name : Build with getlibs
34- run : |
38+ run : |
3539 BUILD=build-$TARGET-libs-$CMAKE_BUILD_TYPE
3640 cmake -S . -B $BUILD
3741 cmake --build $BUILD --config $CMAKE_BUILD_TYPE
@@ -41,19 +45,20 @@ jobs:
4145 env :
4246 TARGET : x86_64-w64-mingw32
4347 WINARCH : win64
44- CMAKE_TOOLCHAIN_FILE : ${{ github.workspace }}/cmake/toolchain/${{ env.TARGET }}.cmake
4548 CMAKE_BUILD_TYPE : Debug
4649 CTEST_OUTPUT_ON_FAILURE : 1
4750 steps :
48- - uses : actions/checkout@v2
49- - name : Install toolchain
51+ - uses : actions/checkout@v3
52+ - name : Setup the toolchain
5053 run : |
5154 sudo apt-get -qqy update
5255 sudo apt-get -qqy install cmake make g++-mingw-w64-x86-64 mingw-w64-x86-64-dev mingw-w64-tools wine wine-binfmt
5356 sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
5457 sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
5558 WINEPATH=$(${{ github.workspace }}/winepath-for ${{ env.TARGET }})
5659 echo "WINEPATH=$WINEPATH" >> $GITHUB_ENV
60+ CMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/cmake/toolchain/${{ env.TARGET }}.cmake"
61+ echo "CMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE" >> $GITHUB_ENV
5762 - name : Build without getlibs
5863 run : |
5964 BUILD=build-$TARGET-$CMAKE_BUILD_TYPE
@@ -73,11 +78,14 @@ jobs:
7378 runs-on : macos-latest
7479 env :
7580 TARGET : x86_64-darwin
76- CMAKE_TOOLCHAIN_FILE : ${{ github.workspace }}/cmake/toolchain/${{ env.TARGET }}.cmake
7781 CMAKE_BUILD_TYPE : Debug
7882 CTEST_OUTPUT_ON_FAILURE : 1
7983 steps :
80- - uses : actions/checkout@v2
84+ - uses : actions/checkout@v3
85+ - name : Setup the toolchain
86+ run : |
87+ CMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/cmake/toolchain/${{ env.TARGET }}.cmake"
88+ echo "CMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE" >> $GITHUB_ENV
8189 - name : Build without getlibs
8290 run : |
8391 BUILD=build-$TARGET-$CMAKE_BUILD_TYPE
0 commit comments