Update to Ubuntu22 and add MacOS-arm #326
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
# The following configuration is used to setup GitHub Actions | |
# for building (and running unit tests) on pushes and PRs. | |
# At the moment, we build on two runner types: Linux and MacOS, | |
# specific version information can be found further below. | |
name: Build On Changes | |
# run action on all pushes and pull_request for all branches | |
on: [pull_request] | |
# high-level constants | |
env: | |
BASE_URL: https://gitlab.sac-home.org/sac-group/sac-packages/-/raw/master/latest/weekly | |
# action listing, all jobs run in parallel | |
jobs: | |
# Ubuntu 22.04 (x86_64) | |
build-ubuntu22: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Get HEAD and submodules | |
uses: actions/checkout@v2 | |
with: | |
# we need to get tag information | |
fetch-depth: 0 | |
# we need to get all submodules | |
submodules: 'recursive' | |
- name: Install sac2c-basic | |
run: | | |
wget ${BASE_URL}/Ubl22/sac2c-basic.deb | |
sudo apt install ./sac2c-basic.deb | |
sac2c -V | |
- name: Create build dir | |
run: | | |
cmake -E make_directory ${{runner.workspace}}/build | |
mkdir $HOME/.sac2crc | |
- name: Configure build-system | |
shell: bash | |
working-directory: ${{runner.workspace}}/build | |
run: cmake -DFULLTYPES=ON $GITHUB_WORKSPACE | |
- name: Build | |
shell: bash | |
working-directory: ${{runner.workspace}}/build | |
run: | | |
cmake --build . -j 2 2>&1 | tee build.log | |
if [ ${PIPESTATUS[0]} -ne 0 ]; then | |
echo "!!! ERROR detected in build !!!"; | |
exit 1; | |
fi | |
${GITHUB_WORKSPACE}/ci/fail-on-warning.sh build.log | |
# MacOS (x86_64) | |
build-macos-x86: | |
runs-on: macos-13 | |
steps: | |
- name: Get HEAD and submodules | |
uses: actions/checkout@v2 | |
with: | |
# we need to get tag information | |
fetch-depth: 0 | |
# we need to get all submodules | |
submodules: 'recursive' | |
- name: Install sac2c-basic | |
run: | | |
wget ${BASE_URL}/MacOS_x86/sac2c-basic.pkg | |
sudo installer -pkg ./sac2c-basic.pkg -target / | |
sac2c -V | |
- name: Set XCode version | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '14.1' | |
- name: Create build dir | |
run: | | |
cmake -E make_directory ${{runner.workspace}}/build | |
mkdir $HOME/.sac2crc | |
- name: Configure build-system | |
shell: bash | |
working-directory: ${{runner.workspace}}/build | |
run: cmake -DFULLTYPES=ON ${GITHUB_WORKSPACE} | |
- name: Build | |
shell: bash | |
working-directory: ${{runner.workspace}}/build | |
run: | | |
cmake --build . -j 2 2>&1 | tee build.log | |
if [ ${PIPESTATUS[0]} -ne 0 ]; then | |
echo "!!! ERROR detected in build !!!"; | |
exit 1; | |
fi | |
${GITHUB_WORKSPACE}/ci/fail-on-warning.sh build.log | |
# MacOS (arm) | |
build-macos-arm: | |
runs-on: macos-15 | |
steps: | |
- name: Get HEAD and submodules | |
uses: actions/checkout@v2 | |
with: | |
# we need to get tag information | |
fetch-depth: 0 | |
# we need to get all submodules | |
submodules: 'recursive' | |
- name: Install sac2c-basic | |
run: | | |
wget ${BASE_URL}/MacOS_arm64/sac2c-basic.pkg | |
sudo installer -pkg ./sac2c-basic.pkg -target / | |
sac2c -V | |
- name: Set XCode version | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '16.2' | |
- name: Create build dir | |
run: | | |
cmake -E make_directory ${{runner.workspace}}/build | |
mkdir $HOME/.sac2crc | |
- name: Configure build-system | |
shell: bash | |
working-directory: ${{runner.workspace}}/build | |
run: cmake -DFULLTYPES=ON ${GITHUB_WORKSPACE} | |
- name: Build | |
shell: bash | |
working-directory: ${{runner.workspace}}/build | |
run: | | |
cmake --build . -j 2 2>&1 | tee build.log | |
if [ ${PIPESTATUS[0]} -ne 0 ]; then | |
echo "!!! ERROR detected in build !!!"; | |
exit 1; | |
fi | |
${GITHUB_WORKSPACE}/ci/fail-on-warning.sh build.log |