1- name : binary build
1+ name : build
22
33on :
44 push :
5- branches :
6- - master
7-
5+ branches : [ "*" ]
6+ pull_request :
7+ branches : [ "*" ]
88
99jobs :
1010 build :
11- # The CMake configure and build commands are platform agnostic and should work equally
12- # well on Windows or Mac. You can convert this to a matrix build if you need
13- # cross-platform coverage.
14- # See: https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#configuring-a-build-matrix
1511 runs-on : ${{ matrix.os }}
1612
17-
1813 strategy :
14+ fail-fast : false
15+
1916 matrix :
20- os : [ubuntu-20.04, windows-2022, macos-13]
21- build_type : ['Release']
22- staticcompile : ['ON', 'OFF']
17+ os : [ubuntu-latest, macos-14, ubuntu-24.04-arm, macos-13, windows-2022 ]
18+ build_type : [Release]
19+ staticcompile : [ON, OFF]
20+ c_compiler : [gcc]
21+ cpp_compiler : [g++]
2322
2423 steps :
2524 - uses : actions/checkout@v4.1.1
26-
25+
2726 # install dependencies
2827 - name : Install boost & help2man for Linux
2928 if : matrix.os == 'ubuntu-20.04'
@@ -33,59 +32,57 @@ jobs:
3332 run : |
3433 pip install pip --upgrade
3534 pip install numpy lit
36-
35+
3736 - name : Add git submodules for Linux only (not needed for non-testing)
3837 if : matrix.os == 'ubuntu-20.04'
3938 run : git submodule update --init
4039
4140 - name : Configure CMake for linux
42- if : matrix.os == 'ubuntu-20.04'
43- # Use a bash shell so we can use the same syntax for environment variable
44- # access regardless of the host operating system
45- # working-directory: ${{runner.workspace}}/build
46- # Note the current convention is to use the -S and -B options here to specify source
47- # and build directories, but this is only available with CMake 3.13 and higher.
48- # The CMake binaries on the Github Actions machines are (as of this writing) 3.12
49- run : cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DENABLE_TESTING=ON -DSTATICCOMPILE=${{ matrix.staticcompile }}
50-
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+
5146 - name : Configure CMake for non-linux
52- if : matrix.os != 'ubuntu-20.04'
53- # Use a bash shell so we can use the same syntax for environment variable
54- # access regardless of the host operating system
55- # working-directory: ${{runner.workspace}}/build
56- # Note the current convention is to use the -S and -B options here to specify source
57- # and build directories, but this is only available with CMake 3.13 and higher.
58- # The CMake binaries on the Github Actions machines are (as of this writing) 3.12
59- run : cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DENABLE_TESTING=OFF -DSTATICCOMPILE=${{ matrix.staticcompile }}
60-
61- - name : Build
62- # working-directory: ${{runner.workspace}}/build
63- # Execute the build. You can specify a specific target with "--target <NAME>"
64- run : cmake --build . --config ${{ matrix.build_type }}
47+ if : ! contains(matrix.os, 'ubuntu')
48+ run : |
49+ cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DENABLE_TESTING=OFF -DSTATICCOMPILE=${{ matrix.staticcompile }}
50+ cmake --build . --config ${{ matrix.build_type }}
6551
6652 - name : Test
67- # working-directory: ${{runner.workspace}}/build
68- # Execute tests defined by the CMake configuration.
69- # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
7053 run : ctest -C ${{ matrix.build_type }}
71-
72- - name : Upload Artifact - Linux
73- if : matrix.os == 'ubuntu-20.04' && matrix.staticcompile == 'ON'
74- uses : actions/upload-artifact@v3
54+
55+ - name : Upload Artifact - Linux x86_64
56+ if : contains( matrix.os, 'ubuntu') && matrix.staticcompile == 'ON' && !contains(matrix.os, 'arm')
57+ uses : actions/upload-artifact@v4
7558 with :
7659 name : cmsgen-linux-amd64
7760 path : cmsgen
78-
79- - name : Upload Artifact - Mac
80- if : matrix.os == 'macos-13' && matrix.staticcompile == 'ON'
81- uses : actions/upload-artifact@v3
61+
62+ - name : Upload Artifact - Linux Arm64
63+ if : contains(matrix.os, 'ubuntu') && matrix.staticcompile == 'ON' && contains(matrix.os, 'arm')
64+ uses : actions/upload-artifact@v4
65+ with :
66+ name : cmsgen-linux-arm64
67+ path : cmsgen
68+
69+ - name : Upload Artifact - Mac Arm64
70+ if : contains(matrix.os, 'macos') && matrix.staticcompile == 'ON' && matrix.os == 'macos-14'
71+ uses : actions/upload-artifact@v4
72+ with :
73+ name : cmsgen-mac-arm64
74+ path : cmsgen
75+
76+ - name : Upload Artifact - Mac x86_64
77+ if : contains(matrix.os, 'macos') && matrix.staticcompile == 'ON' && matrix.os == 'macos-13'
78+ uses : actions/upload-artifact@v4
8279 with :
83- name : cmsgen-mac-amd64
80+ name : cmsgen-mac-x86_64
8481 path : cmsgen
8582
8683 - name : Upload Artifact - Windows
8784 if : matrix.os == 'windows-2022' && matrix.staticcompile == 'ON'
88- uses : actions/upload-artifact@v3
85+ uses : actions/upload-artifact@v4
8986 with :
9087 name : cmsgen-win64.exe
9188 path : Release\cmsgen.exe
0 commit comments