Fix CI package uploading #13
This file contains hidden or 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
# Based on the `hosted-ninja-vcpkg.yml` run-cmake example of Luca Cappa | |
# | |
# Copyright (c) 2020-2021-2022-2023 Luca Cappa | |
# | |
# Released under the term specified in file LICENSE.txt | |
# SPDX short identifier: MIT | |
# | |
# The peculiarity of this workflow is that assumes vcpkg is NOT stored as a | |
# submodule of this repository. | |
# | |
# The workflow does the following: | |
# | |
# - Using the provided Git commit id, sets up vcpkg if needed, then run CMake | |
# with CMakePreset.json using a configuration that leverages the vcpkg's | |
# toolchain file. This will automatically run vcpkg to install dependencies | |
# described by the vcpkg.json manifest file. | |
# | |
# - vcpkg's Binary Caching backed by GH Action cache is being used. It will be | |
# a no-op if the dependencies are restored from GH Action cache. | |
# | |
# - Finally, it builds the sources with Ninja. | |
name: build | |
on: [push, workflow_dispatch] | |
jobs: | |
job: | |
name: ${{ matrix.os }}-${{ github.workflow }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-2019, ubuntu-22.04] | |
include: | |
- os: windows-2019 | |
vcpkgCommitId: '3d89599850c8168fa4b560367b06c1be52645b20' | |
- os: ubuntu-22.04 | |
vcpkgCommitId: '3d89599850c8168fa4b560367b06c1be52645b20' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: lukka/get-cmake@latest | |
- name: Dump the content of $RUNNER_TEMP | |
run: find $RUNNER_TEMP | |
shell: bash | |
- name: Dump the content of $RUNNER_WORKSPACE | |
run: find $RUNNER_WORKSPACE | |
shell: bash | |
- name: Setup vcpkg | |
uses: lukka/run-vcpkg@v11 | |
id: runvcpkg | |
with: | |
# This specifies the location of vcpkg, where it is going to be | |
# restored from cache, or create from scratch. | |
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg' | |
# The Git commit id of vcpkg to be checked out. This is only needed | |
# because we are not using a submodule. | |
vcpkgGitCommitId: '${{ matrix.vcpkgCommitId}}' | |
# The vcpkg.json file, which will be part of cache key computation. | |
vcpkgJsonGlob: '**/vcpkg.json' | |
- name: Prints output of run-vcpkg's action | |
run: echo "root='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}', triplet='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_DEFAULT_TRIPLET_OUT }}'" | |
- name: Run CMake with vcpkg.json manifest | |
uses: lukka/run-cmake@v10 | |
with: | |
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt' | |
configurePreset: release | |
buildPreset: release | |
# used by the Windows build | |
buildPresetAdditionalArgs: "['--config Release']" | |
- name: Dump the content of $RUNNER_WORKSPACE after build | |
run: find $RUNNER_WORKSPACE | |
shell: bash | |
- name: Upload release artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Nuked-SC55-CLAP-${{ matrix.os }} | |
path: build/release/Nuked-SC55.clap |