aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/clippy-check-example.yml
diff options
context:
space:
mode:
authordatdenkikniet <jcdra1@gmail.com>2025-03-22 23:15:04 +0100
committerdatdenkikniet <38322042+datdenkikniet@users.noreply.github.com>2025-03-23 09:57:48 +0000
commit5de3ca0aef627f9d4d095e386c3b833d35477685 (patch)
tree62bb53fca4cd0d13c003dfafc0f0ac764a7d3a5e /.github/workflows/clippy-check-example.yml
parent414d759ed936307aad7f46534d176666c738b314 (diff)
ci: use reusable workflow
Diffstat (limited to '.github/workflows/clippy-check-example.yml')
-rw-r--r--.github/workflows/clippy-check-example.yml56
1 files changed, 56 insertions, 0 deletions
diff --git a/.github/workflows/clippy-check-example.yml b/.github/workflows/clippy-check-example.yml
new file mode 100644
index 0000000..5d44614
--- /dev/null
+++ b/.github/workflows/clippy-check-example.yml
@@ -0,0 +1,56 @@
+name: check-clippy-examples
+on:
+ workflow_call:
+ inputs:
+ backend:
+ description: The backend to execute for
+ required: true
+ type: string
+
+ platform:
+ description: The platform to execute for
+ required: true
+ type: string
+
+ # TODO: get this from `cargo xtask`!
+ rustup-target:
+ description: The rustup target to install
+ required: true
+ type: string
+
+ example-args:
+ description: Extra args to pass when checking examples
+ required: false
+ type: string
+
+jobs:
+ check:
+ runs-on: ubuntu-22.04
+ name: Validate platform ${{ inputs.platform }}, backend ${{ inputs.backend }}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Configure Rust target ${{ inputs.rustup-target }}
+ run: rustup target add ${{ inputs.rustup-target }}
+
+ - name: Cache Dependencies
+ uses: Swatinem/rust-cache@v2
+
+ - run: cargo xtask --deny-warnings check -p ${{ inputs.platform }} -b ${{ inputs.backend }}
+
+ check-examples:
+ runs-on: ubuntu-22.04
+ name: Check examples
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Configure Rust target ${{ inputs.rustup-target }}
+ run: rustup target add ${{ inputs.rustup-target }}
+
+ - name: Cache Dependencies
+ uses: Swatinem/rust-cache@v2
+
+ - name: Check the examples
+ run: cargo xtask example-check --platform ${{ inputs.platform }} --backend ${{ inputs.backend }} ${{ inputs.example-args }} \ No newline at end of file