Manual Build #24
Workflow file for this run
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
name: Manual Build | |
on: | |
workflow_dispatch: | |
inputs: | |
password: | |
required: true | |
architecture: | |
required: true | |
description: 'The architecture to build for' | |
type: choice | |
options: | |
- all | |
- aarch64 | |
- x86-64 | |
- static-aarch64 | |
- static-x86-64 | |
debug: | |
required: false | |
description: 'Enable debug mode' | |
type: boolean | |
default: false | |
# Don't allow multiple of the same job to run | |
concurrency: | |
group: "manual_build" | |
cancel-in-progress: false | |
jobs: | |
check_pass: | |
name: Check password | |
runs-on: ubuntu-latest | |
outputs: | |
is_allowed: ${{ steps.check.outputs.is_allowed }} | |
steps: | |
- id: check | |
run: | | |
password=${{ secrets.CI_PASSWORD }} | |
if [[ "${{ github.event.inputs.password }}" == "${password}" ]]; then | |
echo "is_allowed=true" >> $GITHUB_OUTPUT | |
else | |
echo "is_allowed=false" >> $GITHUB_OUTPUT | |
fi | |
build: | |
needs: check_pass | |
if: ${{ needs.check_pass.outputs.is_allowed == 'true' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: 🫙 Cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
key: cache-v1 | |
cache-on-failure: true | |
- name: 🛠️ Setup Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: 📥 Install Dependencies | |
run: | | |
cargo xtask apt-install ${{ github.event.inputs.architecture }} | |
- name: 🔨 Build Debug Library For ${{ github.event.inputs.architecture }} | |
if: ${{ github.event.inputs.debug == 'true' }} | |
run: | | |
cargo xtask compile ${{ github.event.inputs.architecture }} --debug | |
- name: 🔨 Build Library For ${{ github.event.inputs.architecture }} | |
if: ${{ github.event.inputs.debug == 'false' }} | |
run: | | |
cargo xtask compile ${{ github.event.inputs.architecture }} | |
- name: 📝 Set Branch Name | |
id: set_branch | |
run: echo "FORMATTED_REF=${{ github.ref }}" | sed 's/\//-/g' >> $GITHUB_OUTPUT | |
- name: 📤 Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: branch-${{ steps.set_branch.outputs.FORMATTED_REF }}-arch-${{ github.event.inputs.architecture }}-debug-${{ github.event.inputs.debug }} | |
path: target/libseda_tally_vm*.* | |
overwrite: true |