Skip to content

CMake examples, CI update #91

CMake examples, CI update

CMake examples, CI update #91

Workflow file for this run

name: CI
on:
push:
pull_request:
workflow_dispatch:
# Run GitHub Actions monthly to make sure CI isn't broken and downloads don't expire
schedule:
- cron: '0 0 1 * *'
jobs:
build:
strategy:
matrix:
os:
- runs-on: windows-2022
suffix: ci-windows
- runs-on: ubuntu-22.04
suffix: ci-linux
# The type of runner that the job will run on
runs-on: ${{ matrix.os.runs-on }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3.3.0
with:
submodules: recursive
fetch-depth: 0 # Required for automatic versioning
- name: Install Ubuntu packages
if: matrix.os.runs-on == 'ubuntu-22.04'
run: |
sudo dpkg --add-architecture i386
sudo apt update || true
sudo apt install -y libc6:i386 linux-libc-dev:i386 ninja-build gcc-multilib g++-multilib
- name: Build release
id: build
run: |
cmake --preset github-actions
cmake --build --preset github-actions
cmake --install ${{github.workspace}}/_build/github-actions --config RelWithDebInfo --prefix ${{github.workspace}}/_build/ci-install
# Prepare artifact
- name: Prepare artifact
id: prepare_artifact
run: >
python scripts/package_target.py
--build-dir ${{github.workspace}}/_build/github-actions
--install-dir ${{github.workspace}}/_build/ci-install
--artifact-dir ${{github.workspace}}/_build/ci-artifact
--suffix ${{ matrix.os.suffix }}
# Upload result
- name: Upload build result
uses: actions/upload-artifact@v4
with:
name: ${{ steps.prepare_artifact.outputs.artifact_name }}
path: ${{github.workspace}}/_build/ci-artifact