Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Action: enable the vcpkg binary cache #12

Merged
merged 11 commits into from
Jun 9, 2024
18 changes: 16 additions & 2 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@ name: CI

on: [push, pull_request, workflow_dispatch]

env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"

jobs:
ci-ubuntu:
name: Build on Linux (Ubuntu)
runs-on: ubuntu-latest
steps:
- 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: actions/checkout@v4
- uses: lukka/get-cmake@latest
- name: install SDL2
run: sudo apt update -y && sudo apt install -y libsdl2-dev
- name: install dependencies
run: ./vcpkg.sh
- name: build
Expand All @@ -22,6 +29,12 @@ jobs:
name: Build on MacOS
runs-on: macOS-latest
steps:
- 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: actions/checkout@v4
- uses: lukka/get-cmake@latest
- name: install dependencies
Expand All @@ -30,6 +43,7 @@ jobs:
run: make build
- name: build
run: make test

fmt:
name: Formatting Check
runs-on: ubuntu-latest
Expand Down