ci: enable pull requests action runs and restrict access permissions #14
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: ci | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
concurrency: | |
# Cancels pending runs when a PR gets updated. | |
group: ${{ github.head_ref || github.run_id }}-${{ github.actor }} | |
cancel-in-progress: true | |
permissions: | |
# Sets permission policy for `GITHUB_TOKEN` | |
contents: read | |
# not needed here https://github.com/actions/cache | |
jobs: | |
aarch64-macos: | |
timeout-minutes: 20 | |
runs-on: "macos-latest" | |
env: | |
ARCH: "aarch64" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Zig | |
uses: mlugg/setup-zig@v1 | |
with: | |
version: master | |
mirror: 'https://pkg.machengine.org/zig' | |
- name: Build and Test | |
run: ci/aarch64-macos.sh | |
x86_64-linux: | |
timeout-minutes: 20 | |
runs-on: "ubuntu-latest" | |
env: | |
ARCH: "x86_64" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Zig | |
uses: mlugg/setup-zig@v1 | |
with: | |
version: master | |
mirror: 'https://pkg.machengine.org/zig' | |
- name: Build and Test | |
run: ci/x86_64-linux.sh | |
x86_64-windows: | |
timeout-minutes: 20 | |
runs-on: "windows-latest" | |
env: | |
ARCH: "x86_64" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Zig | |
uses: mlugg/setup-zig@v1 | |
with: | |
version: master | |
mirror: 'https://pkg.machengine.org/zig' | |
- name: Build and Test | |
run: ci/x86_64-windows.ps1 |