-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a2e2487
commit 96e3d0c
Showing
2 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Build & Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
macos: | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
target: [x86_64-macos, aarch64-macos] | ||
optimize: [ReleaseSmall, Debug] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: goto-bus-stop/setup-zig@v2 | ||
- name: Build | ||
run: | | ||
zig build -Dtarget=${{ matrix.target }} -Doptimize=${{ matrix.optimize }} | ||
- name: Test | ||
run: | | ||
zig build test | ||
windows: | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
target: [x86_64-windows, aarch64-windows] | ||
optimize: [ReleaseSmall, Debug] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: goto-bus-stop/setup-zig@v2 | ||
- name: Build | ||
run: | | ||
zig build -Dtarget=${{ matrix.target }} -Doptimize=${{ matrix.optimize }} | ||
- name: Test | ||
run: | | ||
zig build test | ||
linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
target: [x86_64-linux, aarch64-linux, riscv64-linux] | ||
optimize: [ReleaseSmall, Debug] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: goto-bus-stop/setup-zig@v2 | ||
- name: Build | ||
run: | | ||
zig build -Dtarget=${{ matrix.target }} -Doptimize=${{ matrix.optimize }} | ||
- name: Test | ||
run: | | ||
zig build test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Update Phantom UI | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
update-phantom: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: main | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: PhantomUIx/core | ||
path: phantom-core | ||
- uses: goto-bus-stop/setup-zig@v2 | ||
- name: Update Phantom UI | ||
run: | | ||
export PHANTOM_SHA=$(git -C phantom-core rev-parse HEAD) | ||
pushd main | ||
git switch -c update-phantom/$PHANTOM_SHA | ||
zig fetch --save=phantom https://github.com/PhantomUIx/core/archive/$PHANTOM_SHA.tar.gz | ||
git config user.name "GitHub Actions Bot" | ||
git config user.email "<>" | ||
if ! git diff-index --quiet HEAD --; then | ||
git add build.zig.zon | ||
git commit build.zig.zon -m "chore: update core to $PHANTOM_SHA" | ||
export HAS_CHANGES=yes | ||
else | ||
export HAS_CHANGES=no | ||
fi | ||
popd | ||
- name: Open PR | ||
uses: peter-evans/create-pull-request@v5 | ||
if: env.HAS_CHANGES == 'yes' | ||
with: | ||
title: "Update Phantom UI core to ${{ env.PHANTOM_SHA }}" | ||
branch: update-phantom/${{ env.PHANTOM_SHA }} | ||
path: main |