Files
notedeck/.github/workflows/build-and-test.yml
William Casarin 355151e1d4 Revert "ci: build before test"
to figure out this packaging issue...

This reverts commit 24db85f1d0.
2024-11-28 17:45:31 -08:00

47 lines
1.0 KiB
YAML

name: Build & Test
on:
workflow_call:
inputs:
os:
required: true
type: string
upload-artifact-name:
required: true
type: string
upload-artifact-path:
required: true
type: string
additional-setup:
required: false
type: string
jobs:
run:
runs-on: ${{ inputs.os }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Additional Setup (if specified)
if: ${{ inputs.additional-setup != '' }}
run: ${{ inputs.additional-setup }}
- name: Run Tests
run: cargo test --release
- name: Build
run: cargo build --release
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.upload-artifact-name }}
path: ${{ inputs.upload-artifact-path }}