Skip to content

Commit

Permalink
env
Browse files Browse the repository at this point in the history
  • Loading branch information
mattnite committed Dec 23, 2024
1 parent 1e6b15e commit c8d978d
Showing 1 changed file with 35 additions and 8 deletions.
43 changes: 35 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ on:
pull_request:
branches: [main, zig-master]


defaults:
run:
environment:
ZIG_VERSION: ${{ github.ref == 'refs/heads/zig-master' && 'master' || '0.13.0' }}

jobs:
build:
name: Build
Expand All @@ -13,7 +19,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Zig
uses: ./.github/workflows/setup-zig.yml
uses: mlugg/setup-zig@v1
with:
version: ${{ env.ZIG_VERSION }}
- name: Build
run: zig build -Doptimize=ReleaseSmall

Expand All @@ -36,7 +44,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Zig
uses: ./.github/workflows/setup-zig.yml
uses: mlugg/setup-zig@v1
with:
version: ${{ env.ZIG_VERSION }}
- name: Unit Test Ports
run: zig build test
working-directory: port/${{ matrix.port_dir }}
Expand All @@ -55,7 +65,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Zig
uses: ./.github/workflows/setup-zig.yml
uses: mlugg/setup-zig@v1
with:
version: ${{ env.ZIG_VERSION }}
- name: Unit Test Regz
run: zig build test
working-directory: tools/regz
Expand All @@ -74,19 +86,30 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Zig
uses: ./.github/workflows/setup-zig.yml
uses: mlugg/setup-zig@v1
with:
version: ${{ env.ZIG_VERSION }}
- name: Unit Test UF2
run: zig build test
working-directory: tools/uf2

build-website:
name: Build Website
runs-on: ubuntu-latest
strategy:
matrix:
os: [
ubuntu-latest,
windows-latest,
macos-latest,
]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Zig
uses: ./.github/workflows/setup-zig.yml
uses: mlugg/setup-zig@v1
with:
version: ${{ env.ZIG_VERSION }}
- name: Build Website
run: zig build
working-directory: website
Expand All @@ -98,7 +121,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Zig
uses: ./.github/workflows/setup-zig.yml
uses: mlugg/setup-zig@v1
with:
version: ${{ env.ZIG_VERSION }}
- name: Dry Run Packaging
run: |
MICROZIG_VERSION=$(zig build package -- get-version)
Expand Down Expand Up @@ -133,7 +158,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Zig
uses: ./.github/workflows/setup-zig.yml
uses: mlugg/setup-zig@v1
with:
version: ${{ env.ZIG_VERSION }}
- name: Build Examples
run: zig build -Doptimize=ReleaseSmall --summary all
working-directory: examples/${{ matrix.example_dir }}
Expand Down

0 comments on commit c8d978d

Please sign in to comment.