Skip to content

Commit 7214867

Browse files
committed
initial implementation
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
1 parent 39d3524 commit 7214867

59 files changed

Lines changed: 111961 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: cargo
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
day: monday
8+
open-pull-requests-limit: 5
9+
10+
- package-ecosystem: github-actions
11+
directory: /
12+
schedule:
13+
interval: weekly
14+
day: monday
15+
open-pull-requests-limit: 5

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
RUST_BACKTRACE: 1
11+
12+
jobs:
13+
check:
14+
name: Build, lint, audit, test
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: dtolnay/rust-toolchain@stable
21+
with:
22+
components: clippy
23+
24+
- uses: Swatinem/rust-cache@v2
25+
26+
# Build first — catches template include_str! failures and compile errors
27+
# before running the slower test step.
28+
- name: Build
29+
run: cargo build --release
30+
31+
- name: Clippy
32+
run: cargo clippy --all-targets -- -D warnings
33+
34+
- name: Audit
35+
uses: rustsec/audit-check@v2
36+
with:
37+
token: ${{ secrets.GITHUB_TOKEN }}
38+
39+
# Integration tests invoke the binary and compile the generated C.
40+
# gcc is pre-installed on ubuntu-latest.
41+
- name: Test
42+
run: cargo test --release

.github/workflows/release-plz.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Release-plz
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release-plz-release:
10+
name: Release-plz release
11+
runs-on: ubuntu-latest
12+
if: ${{ github.repository_owner == 'tycho' }}
13+
permissions:
14+
contents: write
15+
id-token: write
16+
steps:
17+
- &checkout
18+
name: Checkout repository
19+
uses: actions/checkout@v6
20+
with:
21+
fetch-depth: 0
22+
persist-credentials: true
23+
token: ${{ secrets.RELEASE_PLZ_TOKEN }}
24+
- &install-rust
25+
name: Install Rust toolchain
26+
uses: dtolnay/rust-toolchain@stable
27+
- name: Run release-plz
28+
uses: release-plz/action@v0.5
29+
with:
30+
command: release
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
33+
34+
release-plz-pr:
35+
name: Release-plz PR
36+
runs-on: ubuntu-latest
37+
if: ${{ github.repository_owner == 'tycho' }}
38+
permissions:
39+
pull-requests: write
40+
contents: write
41+
concurrency:
42+
group: release-plz-${{ github.ref }}
43+
cancel-in-progress: false
44+
steps:
45+
- *checkout
46+
- *install-rust
47+
- name: Run release-plz
48+
uses: release-plz/action@v0.5
49+
with:
50+
command: release-pr
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Update bundled XML and headers
2+
3+
on:
4+
schedule:
5+
# Every Monday at 05:00 UTC.
6+
- cron: "0 5 * * 1"
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
13+
jobs:
14+
update:
15+
name: Fetch and validate
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- uses: dtolnay/rust-toolchain@stable
22+
23+
- uses: Swatinem/rust-cache@v2
24+
25+
- name: Fetch bundled files
26+
run: ./scripts/fetch_bundled.sh
27+
28+
- name: Build with updated files
29+
# This is the primary validity check: include_str! will fail at
30+
# compile time if any fetched file is empty or missing.
31+
run: cargo build --release
32+
33+
- name: Run test suite against updated files
34+
run: cargo test --release
35+
36+
- name: Open pull request
37+
uses: peter-evans/create-pull-request@v6
38+
with:
39+
token: ${{ secrets.GITHUB_TOKEN }}
40+
add-paths: bundled/
41+
commit-message: "chore: update bundled XML specs and headers"
42+
title: "chore: update bundled XML specs and headers"
43+
body: |
44+
Automated weekly refresh of `bundled/xml/` and `bundled/headers/`
45+
from upstream Khronos and ANGLE sources.
46+
47+
The build and test suite passed against the new files before this
48+
PR was opened.
49+
branch: update-bundled-xml
50+
delete-branch: true
51+
labels: dependencies

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/target
2+
/output

.release-plz.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[workspace]
2+
git_release_enable = true
3+
git_release_name = "{{ version }}"
4+
git_tag_enable = true
5+
git_tag_name = "{{ version }}"
6+
pr_branch_prefix = "release/"
7+
pr_draft = true
8+
pr_labels = ["release"]
9+
release_always = true

0 commit comments

Comments
 (0)