Skip to content

-fixed release CI config #10

-fixed release CI config

-fixed release CI config #10

Workflow file for this run

name: release
on:
push:
tags: [ "v*" ]
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Ubuntu 20.04 clang",
os: ubuntu-20.04,
cmake_vars: "-DBoost_USE_STATIC_LIBS=ON -DBoost_USE_STATIC_RUNTIME=ON",
cmake-preset: clang-release,
artifacts: "build/lunchtoast"
}
- {
name: "Windows Latest MSVC",
os: windows-latest,
cmake_vars: "-DVCPKG_TARGET_TRIPLET=x64-windows-static-md",
cmake-preset: msvc-release,
artifacts: "build/lunchtoast.exe"
}
steps:
- name: Install ninja (Windows)
if: matrix.config.os == 'windows-latest'
run: choco install ninja
- name: Install ninja (Linux)
if: matrix.config.os == 'ubuntu-20.04'
run: sudo apt install ninja-build
- uses: actions/checkout@v4
- uses: hendrikmuhs/ccache-action@v1.2
- uses: ilammy/msvc-dev-cmd@v1
- uses: lukka/run-vcpkg@v10
with:
vcpkgGitCommitId: 31a159c1cae2bf905299085d9ef01bdfea0ca7b8
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=ON ${{ matrix.config.cmake_vars }} -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/vcpkg/scripts/buildsystems/vcpkg.cmake --preset="${{ matrix.config.cmake-preset }}"
- name: Build
run: cmake --build ${{github.workspace}}/build --config Release
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: lunchtoast-build-${{ matrix.config.os }}
path: ${{ matrix.config.artifacts }}
release:
name: Release
needs: build
runs-on: ubuntu-20.04
steps:
- name: Download lunchtoast build
uses: actions/download-artifact@v3
with:
name: lunchtoast-build-ubuntu-20.04
path: build
- name: Download lunchtoast build
uses: actions/download-artifact@v3
with:
name: lunchtoast-build-windows-latest
path: build
- name: Upload release
uses: softprops/action-gh-release@v1
with:
files: |
build/lunchtoast.exe
build/lunchtoast