Skip to content

Workflow file for this run

on:
pull_request:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
manualTrigger:
description: trigger a PR or release run
required: true
default: pr
type: choice
options:
- pr
- release
defaults:
run:
working-directory: ./ci
jobs:
compile:
if: >
(github.event_name == 'pull_request') ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.manualTrigger == 'pr')
runs-on: ubuntu-latest
steps:
- name: Install needed packages
run: >-
sudo apt-get update &&
sudo apt-get install -y --no-install-recommends --no-install-suggests --no-upgrade
msitools libgcab-dev winbind ninja-build wine-stable
- name: Cache msvc-wine
id: msvc-wine-cache
uses: actions/cache@v4
with:
path: msvc-wine
key: msvc-wine-cache-key
- name: Download and install msvc-wine
if: steps.msvc-wine-cache.outputs.cache-hit != 'true'
run: |-
git clone https://github.com/mstorsjo/msvc-wine.git
cd msvc-wine
./vsdownload.py --dest msvc --accept-license
./install.sh msvc
- name: Add msvc-wine to path
run: |-
echo $PWD/msvc-wine/msvc/bin/x86 >> $GITHUB_PATH
echo $GITHUB_PATH
- name: Checkout source
uses: actions/checkout@v4
- name: Configure
run: >-
touch CMakePresets.json &&
CC=cl CXX=cl cmake -S . -B build -G"Ninja Multi-Config" -DCMAKE_SYSTEM_NAME=Windows
- name: Build
run: |-
cmake --build build/ --config Release -- -v
assemble:
if: >
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') == 'true') ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.manualTrigger == 'release')
needs: [ compile ]
runs-on: ubuntu-latest
steps:
- name: Test manual release
run: >-
echo ${{github.event.inputs.manualTrigger}}