-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github: split matrix into individual build steps per OS
So we don't have to wait for the whole matrix to start building individual packages per OS Signed-off-by: William Casarin <[email protected]>
- Loading branch information
Showing
2 changed files
with
88 additions
and
77 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,56 @@ | ||
name: Build, Test | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
required: true | ||
type: string | ||
upload-artifact-name: | ||
required: true | ||
type: string | ||
upload-artifact-name: | ||
required: true | ||
type: string | ||
additional-setup: | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
run: | ||
runs-on: ${{ inputs.os }} | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Rust cache | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Additional Setup (if specified) | ||
if: ${{ inputs.additional-setup != '' }} | ||
run: ${{ inputs.additional-setup }} | ||
|
||
- name: Run Tests | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --release | ||
|
||
- name: Build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release | ||
|
||
- name: Upload Build Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ inputs.upload-artifact-name }} | ||
path: ${{ inputs.upload-artifact-path }} |
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