Skip to content

chore(deps): update actions/checkout action to v7 #354

chore(deps): update actions/checkout action to v7

chore(deps): update actions/checkout action to v7 #354

Workflow file for this run

name: Build Project
on:
push:
branches: [master, ver/*]
pull_request:
branches: [master, ver/*]
workflow_dispatch:
jobs:
format:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v7
- name: Install Clang Tools
run: |
pip install clang-tools
clang-tools --install 21 --tool clang-format
clang-format --version
- name: Check Formatting
run: bash check-format.sh
build:
needs: format
timeout-minutes: 180
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
id: linuxx64
- os: ubuntu-24.04-arm
id: linuxarm64
- os: windows-2025
id: mingwx64
- os: macos-15-intel
id: macosx64
- os: macos-15
id: macosarm64
permissions:
contents: read
id-token: write
attestations: write
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
with:
submodules: "recursive"
- uses: actions/setup-dotnet@v5
if: ${{ matrix.os == 'windows-2025' }}
with:
dotnet-version: "9"
- name: Setup Global Dotnet Tool Cache
if: ${{ matrix.os == 'windows-2025' }}
uses: actions/cache@v5
with:
path: ~/.dotnet/tools
key: ${{ runner.os }}-${{ runner.arch }}-dotnet-tools
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-dotnet-tools
- name: Install WiX & NSIS
if: ${{ matrix.os == 'windows-2025' }}
run: |
dotnet tool install --global wix --version 5.0.2
wix extension add --global WixToolset.UI.wixext/5.0.2
choco install nsis
- name: Install Kotlin
if: ${{ matrix.os != 'ubuntu-24.04-arm' }}
uses: fwilhe2/setup-kotlin@main
with:
version: "2.3.0"
install-native: true
- name: Setup Konan
if: ${{ matrix.os != 'ubuntu-24.04-arm' }}
uses: actions/cache@v5
with:
path: |
~/.konan/caches
~/.konan/dependencies
~/.konan/kotlin-native-prebuilt-*
/root/.konan/caches
/root/.konan/dependencies
/root/.konan/kotlin-native-prebuilt-*
key: ${{ runner.os }}-${{ runner.arch }}-konan
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-konan
- name: Link CInterop Command
if: ${{ matrix.os == 'ubuntu-24.04' }}
run: |
sudo ln -s $KOTLIN_NATIVE_HOME/bin/cinterop /usr/local/bin/cinterop
sudo ln -s $KOTLIN_NATIVE_HOME/bin/run_konan /usr/local/bin/run_konan
sudo ln -s $KOTLIN_NATIVE_HOME/bin/kotlinc-native /usr/local/bin/kotlinc-native
- name: Install Linux Dependencies
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo apt-get update
sudo apt-get install -y libasound2-dev libncursesw5-dev
- name: Configure Project (Posix)
if: ${{ matrix.os != 'windows-2025' }}
run: cmake -B build -DPROJECT_VERSION_SUFFIX=${GITHUB_SHA::7} -DSAMPLES_CMDFX=ON
shell: bash
- name: Configure Project (Windows)
if: ${{ matrix.os == 'windows-2025' }}
run: cmake -B build -G "MinGW Makefiles" -DPROJECT_VERSION_SUFFIX=${GITHUB_SHA::7} -DSAMPLES_CMDFX=ON
shell: bash
- name: Build Project
run: |
cmake --build build --config Debug --target package
rm -rf build/package/_CPack_Packages/
shell: bash
- name: Archive Package Artifacts
id: archive
if: success() || failure()
uses: actions/upload-artifact@v7
with:
name: CmdFX-${{ runner.os }}-${{ runner.arch }}-${{ github.sha }}
path: |
build/package/*
build/cinterop/*
overwrite: true
if-no-files-found: error
- name: Attest Build Artifacts
if: success() || failure()
uses: actions/attest-build-provenance@v4
with:
subject-name: CmdFX-${{ runner.os }}-${{ runner.arch }}-${{ github.sha }}
subject-digest: sha256:${{ steps.archive.outputs.artifact-digest }}
- name: Test Project (Posix)
if: ${{ matrix.os != 'windows-2025' }}
run: |
cd build
sudo ctest -C Debug -T test --output-on-failure --parallel 4
cd ..
shell: bash
- name: Test Project (Windows)
if: ${{ matrix.os == 'windows-2025' }}
run: |
cd build
ctest -C Debug -T test --output-on-failure --parallel 4
cd ..
shell: bash
- name: Archive Test Reports
if: success() || failure()
uses: actions/upload-artifact@v7
with:
name: CmdFX-${{ runner.os }}-${{ runner.arch }}-${{ github.sha }}-test
path: build/Testing/*
if-no-files-found: ignore
sanitizers:
needs: format
name: Sanitizers (${{ matrix.script }})
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
contents: read
strategy:
fail-fast: false
matrix:
script: [asan.sh, ubsan.sh, tsan.sh]
steps:
- uses: actions/checkout@v7
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libasound2-dev libncursesw5-dev
- name: Run ${{ matrix.script }}
run: bash ${{ matrix.script }}
deploy:
runs-on: ubuntu-latest
needs: build
name: Deploy Doxygen
if: ${{ github.event_name != 'pull_request' && github.ref_name == 'master' }}
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v7
- name: Install Doxygen
uses: ssciwr/doxygen-install@v2
- name: Install Linux Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libasound2-dev libncursesw5-dev
- name: Configure Project
run: cmake -B build
- name: Build Docs
run: cmake --build build --target docs
- name: Deploy Doxygen
run: bash doxygen.sh ${GITHUB_SHA::7}
publish:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
id: linuxx64
- os: windows-2025
id: mingwx64
- os: macos-15-intel
id: macosx64
- os: macos-15
id: macosarm64
needs: build
runs-on: ${{ matrix.os }}
if: ${{ github.event_name != 'pull_request' }}
permissions:
contents: read
packages: write
id-token: write
attestations: write
steps:
- uses: actions/checkout@v7
with:
submodules: "recursive"
- name: Setup Maven Settings
if: ${{ matrix.os != 'ubuntu-24.04-arm' }}
uses: s4u/maven-settings-action@v4.0.0
with:
servers: '[{"id": "github", "username": "${{ github.actor }}", "password": "${{ secrets.GITHUB_TOKEN }}"}]'
- name: Install Kotlin
if: ${{ matrix.os != 'ubuntu-24.04-arm' }}
uses: fwilhe2/setup-kotlin@main
with:
version: "2.3.0"
install-native: true
- name: Setup Konan
if: ${{ matrix.os != 'ubuntu-24.04-arm' }}
uses: actions/cache@v5
with:
path: |
~/.konan/caches
~/.konan/dependencies
~/.konan/kotlin-native-prebuilt-*
/root/.konan/caches
/root/.konan/dependencies
/root/.konan/kotlin-native-prebuilt-*
key: ${{ runner.os }}-${{ runner.arch }}-konan
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-konan
- name: Install Linux Dependencies
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo apt-get update
sudo apt-get install -y libasound2-dev libncursesw5-dev
- name: Configure Project (Posix)
if: ${{ matrix.os != 'windows-2025' }}
run: cmake -B build -DPROJECT_VERSION_SUFFIX=SNAPSHOT -DKN_INSTALL_ARTIFACTID="cmdfx-${{ matrix.id }}" -DTEST_CMDFX=OFF -DDEPLOY_CMDFX=ON
shell: bash
- name: Configure Project (Windows)
if: ${{ matrix.os == 'windows-2025' }}
run: cmake -B build -G "MinGW Makefiles" -DPROJECT_VERSION_SUFFIX=SNAPSHOT -DKN_INSTALL_ARTIFACTID="cmdfx-${{ matrix.id }}" -DTEST_CMDFX=OFF -DDEPLOY_CMDFX=ON
shell: bash
- name: Publish Kotlin/Native Library
run: cmake --build build --config Debug