Skip to content

Use upstream vcpkg instead of our own vcpkg fork #99

Use upstream vcpkg instead of our own vcpkg fork

Use upstream vcpkg instead of our own vcpkg fork #99

Workflow file for this run

name: Vcpkg build
on: [push]
jobs:
build:
name: ${{ matrix.cfg.os }}
runs-on: ${{ matrix.cfg.os }}
strategy:
fail-fast: false
matrix:
cfg:
- { os: ubuntu-latest, id: linux }
- { os: windows-latest, id: windows }
- { os: macos-latest, id: mac }
env:
VCPKG_TAG: 2025.01.13
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- uses: seanmiddleditch/gha-setup-ninja@master
- name: Install vcpkg
run: |
git clone --depth 1 --branch ${{ env.VCPKG_TAG }} https://github.com/microsoft/vcpkg "${{ runner.TEMP }}/vcpkg"
- name: Bootstrap vcpkg windows
if: ${{ runner.os == 'Windows' }}
run: |
${{ runner.TEMP }}/vcpkg/bootstrap-vcpkg.bat
- name: Bootstrap vcpkg unix
if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }}
run: |
sh ${{ runner.TEMP }}/vcpkg/bootstrap-vcpkg.sh
- uses: taiki-e/install-action@v2
with:
tool: just
- name: Install linux dependencies
if: ${{ runner.os == 'Linux' }}
run: sudo apt-get install nasm openssl autoconf autoconf-archive
- name: Install osx dependencies
if: ${{ runner.os == 'macOS' }}
run: |
brew install nasm autoconf autoconf-archive
- name: Bootstrap the ports
id: bootstrap
run: just bootstrap
env:
VCPKG_ROOT: "${{ runner.temp }}/vcpkg"
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
- name: Build the code
env:
VCPKG_ROOT: "${{ runner.temp }}/vcpkg"
run: just build
- name: Run the unit tests
env:
VCPKG_ROOT: "${{ runner.temp }}/vcpkg"
run: just test
- name: Archive build logs
if: ${{ failure() && steps.bootstrap.conclusion == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.cfg.id }}-build-logs
path: |
${{ runner.temp }}/vcpkg/buildtrees/**/autoconf*.log
${{ runner.temp }}/vcpkg/buildtrees/**/config*.log
${{ runner.temp }}/vcpkg/buildtrees/**/build*.log
${{ runner.temp }}/vcpkg/buildtrees/**/install*.log
${{ runner.temp }}/vcpkg/buildtrees/**/package*.log