Skip to content

Commit

Permalink
CI: run on pull requests
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Gutekanst <[email protected]>
  • Loading branch information
slimsag committed Oct 9, 2024
1 parent fda6cf0 commit d2fc58d
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: CI
on:
pull_request:
paths-ignore:
- "**.md"
jobs:
all:
strategy:
matrix:
target: [
'x86_64-linux-gnu',
'x86_64-linux-musl',
'aarch64-linux-gnu',
'aarch64-linux-musl',
'x86_64-windows-gnu',
'aarch64-windows-gnu',
'x86_64-macos-none',
'aarch64-macos-none',
]
optimize: [Debug, ReleaseFast]
include:
- target: 'x86_64-linux-gnu'
cpu: '-Dcpu=x86_64_v2'
- target: 'x86_64-linux-musl'
cpu: '-Dcpu=x86_64_v2'
- target: 'x86_64-windows-gnu'
cpu: '-Dcpu=x86_64_v2'
- target: 'x86_64-macos-none'
cpu: '-Dcpu=x86_64_v2'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Zig
run: |
sudo apt install xz-utils
sudo sh -c 'wget -c https://pkg.machengine.org/zig/zig-linux-x86_64-0.14.0-dev.1710+8ee52f99c.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
- name: build
run: zig build -Dfrom_source -Dtarget=${{ matrix.target }} -Doptimize=${{ matrix.optimize }} ${{ matrix.cpu }} install dxc
msvc:
# TODO: re-enable required MSVC builds
continue-on-error: true
strategy:
matrix:
target: [
'x86_64-windows-msvc',
# TODO: 'machine type x64 conflicts with arm64' during linking (zig bug)
# 'aarch64-windows-msvc',
]
optimize: [Debug, ReleaseFast]
include:
- target: 'x86_64-windows-msvc'
cpu: '-Dcpu=x86_64_v2'
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Zig
run: |
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri "https://pkg.machengine.org/zig/zig-windows-x86_64-0.14.0-dev.1710+8ee52f99c.zip" -OutFile "C:\zig.zip"
cd C:\
7z x zig.zip
Add-Content $env:GITHUB_PATH "C:\zig-windows-x86_64-0.14.0-dev.1710+8ee52f99c\"
- name: build
run: zig build -Dfrom_source -Dtarget=${{ matrix.target }} -Doptimize=${{ matrix.optimize }} ${{ matrix.cpu }} install dxc

0 comments on commit d2fc58d

Please sign in to comment.