Use upstream vcpkg instead of our own vcpkg fork #94
This file contains 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
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 } | ||
- { os: windows-latest } | ||
- { os: macos-latest } | ||
- { os: macos-latest } | ||
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 | ||
- name: Install osx dependencies | ||
if: ${{ runner.os == 'macOS' }} | ||
run: | | ||
brew install nasm | ||
- name: Bootstrap the ports | ||
working-directory: ./cpp | ||
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" | ||
working-directory: ./cpp | ||
run: just build | ||
- name: Run the unit tests | ||
env: | ||
VCPKG_ROOT: "${{ runner.temp }}/vcpkg" | ||
working-directory: ./cpp | ||
run: just test |