Skip to content

chore(deps): update actions/download-artifact action to v5 #249

chore(deps): update actions/download-artifact action to v5

chore(deps): update actions/download-artifact action to v5 #249

Workflow file for this run

name: Build Project
on:
push:
branches: [ master, ver/* ]
pull_request:
branches: [ master, ver/* ]
workflow_dispatch:
jobs:
build:
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-13
id: macosx64
- os: macos-15
id: macosarm64
permissions:
contents: read
id-token: write
attestations: write
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/setup-dotnet@v4
if: ${{ matrix.os == 'windows-2025' }}
with:
dotnet-version: '9'
- name: Setup Global Dotnet Tool Cache
if: ${{ matrix.os == 'windows-2025' }}
uses: actions/cache@v4
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.1.20'
install-native: true
- name: Setup Konan
if: ${{ matrix.os != 'ubuntu-24.04-arm' }}
uses: actions/cache@v4
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: 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@v4
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@v3
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 -j0 --output-on-failure
cd ..
shell: bash
- name: Test Project (Windows)
if: ${{ matrix.os == 'windows-2025' }}
run: |
cd build
ctest -C Debug -T test -j0 --output-on-failure
cd ..
shell: bash
- name: Archive Test Reports
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: CmdFX-${{ runner.os }}-${{ runner.arch }}-${{ github.sha }}-test
path: build/Testing/*
if-no-files-found: ignore
deploy:
runs-on: ubuntu-latest
needs: build
name: Deploy Doxygen
if: ${{ github.event_name != 'pull_request' && github.ref_name == 'master' }}
steps:
- uses: actions/checkout@v4
- name: Install Doxygen
uses: ssciwr/doxygen-install@v1
- 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-13
id: macosx64
- os: macos-15
id: macosarm64
needs: build
runs-on: ${{ matrix.os }}
if: ${{ github.event_name != 'pull_request' }}
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Setup Maven Settings
if: ${{ matrix.os != 'ubuntu-24.04-arm' }}
uses: s4u/maven-settings-action@v3.1.0
with:
servers: '[{"id": "calcugames", "username": "${{ secrets.MAVEN_USERNAME_CALCUGAMES }}", "password": "${{ secrets.MAVEN_PASSWORD_CALCUGAMES }}"}]'
- name: Install Kotlin
if: ${{ matrix.os != 'ubuntu-24.04-arm' }}
uses: fwilhe2/setup-kotlin@main
with:
version: '2.1.21'
install-native: true
- name: Setup Konan
if: ${{ matrix.os != 'ubuntu-24.04-arm' }}
uses: actions/cache@v4
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: 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