@@ -21,33 +21,31 @@ jobs:
2121 cpp_compiler : [g++]
2222
2323 steps :
24- - uses : actions/checkout@v4.1.1
25-
26- # install dependencies
27- - name : Install boost & help2man for Linux
28- if : matrix.os == 'ubuntu-20.04'
29- run : sudo apt-get update && sudo apt-get install -yq help2man
24+ - uses : actions/setup-python@v5
25+ with :
26+ python-version : ' 3.10'
3027
3128 - name : Installing Numpy
3229 run : |
3330 pip install pip --upgrade
3431 pip install numpy lit
3532
36- - name : Add git submodules for Linux only (not needed for non-testing)
37- if : matrix.os == 'ubuntu-20.04'
38- run : git submodule update --init
39-
40- - name : Configure CMake for linux
41- if : contains(matrix.os, 'ubuntu')
42- run : |
43- cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DENABLE_TESTING=ON -DSTATICCOMPILE=${{ matrix.staticcompile }}
44- cmake --build . --config ${{ matrix.build_type }}
45-
46- - name : Configure CMake for non-linux
47- if : ! contains(matrix.os, 'ubuntu')
33+ - uses : actions/checkout@v4
34+ with :
35+ path : project
36+ submodules : ' true'
37+ - name : Build project
4838 run : |
49- cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DENABLE_TESTING=OFF -DSTATICCOMPILE=${{ matrix.staticcompile }}
50- cmake --build . --config ${{ matrix.build_type }}
39+ cd project
40+ mkdir -p build && cd build
41+ cmake \
42+ -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \
43+ -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \
44+ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
45+ -DENABLE_TESTING=OFF \
46+ -DSTATICCOMPILE=${{ matrix.staticcompile }} \
47+ -S ..
48+ cmake --build . --config ${{matrix.build_type}} -v
5149
5250 - name : Test
5351 run : ctest -C ${{ matrix.build_type }}
@@ -57,32 +55,32 @@ jobs:
5755 uses : actions/upload-artifact@v4
5856 with :
5957 name : cmsgen-linux-amd64
60- path : cmsgen
58+ path : project/build/ cmsgen
6159
6260 - name : Upload Artifact - Linux Arm64
6361 if : contains(matrix.os, 'ubuntu') && matrix.staticcompile == 'ON' && contains(matrix.os, 'arm')
6462 uses : actions/upload-artifact@v4
6563 with :
6664 name : cmsgen-linux-arm64
67- path : cmsgen
65+ path : project/build/ cmsgen
6866
6967 - name : Upload Artifact - Mac Arm64
7068 if : contains(matrix.os, 'macos') && matrix.staticcompile == 'ON' && matrix.os == 'macos-14'
7169 uses : actions/upload-artifact@v4
7270 with :
7371 name : cmsgen-mac-arm64
74- path : cmsgen
72+ path : project/build/ cmsgen
7573
7674 - name : Upload Artifact - Mac x86_64
7775 if : contains(matrix.os, 'macos') && matrix.staticcompile == 'ON' && matrix.os == 'macos-13'
7876 uses : actions/upload-artifact@v4
7977 with :
8078 name : cmsgen-mac-x86_64
81- path : cmsgen
79+ path : project/build/ cmsgen
8280
8381 - name : Upload Artifact - Windows
8482 if : matrix.os == 'windows-2022' && matrix.staticcompile == 'ON'
8583 uses : actions/upload-artifact@v4
8684 with :
8785 name : cmsgen-win64.exe
88- path : Release\cmsgen.exe
86+ path : project\build\ Release\cmsgen.exe
0 commit comments