-
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.
feat: update pipeline to allow more build targets
- Loading branch information
1 parent
cdc7f10
commit fa6dd27
Showing
3 changed files
with
44 additions
and
2 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,42 @@ | ||
name: build_target | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
target: | ||
type: string | ||
description: 'Build target' | ||
required: true | ||
channel: | ||
type: string | ||
description: 'Build target' | ||
required: false | ||
default: 'stable' | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Rust | ||
run: rustup update ${inputs.channel} | ||
|
||
- name: Install cross-compilation tools | ||
uses: taiki-e/setup-cross-toolchain-action@v1 | ||
with: | ||
target: ${inputs.target} | ||
|
||
- run: cargo build --release | ||
|
||
- name: Package ${inputs.channel}-${inputs.target} | ||
run: | | ||
tar -cvzf kneeboard-${inputs.channel}-${inputs.target}.tar.gz README.md LICENSE -C ./target/release kneeboard | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: kneeboard-${inputs.channel}-${inputs.target} | ||
path: kneeboard-${inputs.channel}-${inputs.target}.tar.gz | ||
|
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
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