Build simple zip archive #8
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: "Ark: Build Linux Releases" | |
on: | |
push: | |
workflow_call: | |
inputs: | |
version: | |
required: false | |
description: "The Ark version" | |
default: ${{ github.sha }} | |
type: string | |
workflow_dispatch: | |
jobs: | |
build_linux: | |
name: Build Linux packages | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
DEBUG_FLAG: ${{ matrix.flavor == 'debug' && '-debug' || '' }} | |
strategy: | |
matrix: | |
arch: [x64] | |
flavor: [debug, release] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Setup Build Environment | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y cargo | |
- name: Compile ARK (${{ matrix.flavor }}) | |
run: | | |
cargo clean | |
cargo build ${{ matrix.flavor == 'release' && '--release' || '' }} | |
# Compress kernel to a zip file | |
- name: Create archive | |
run: | | |
# Enter the build directory | |
pushd target/${{ matrix.flavor }} | |
# Compress the kernel to an archive | |
ARCHIVE="$GITHUB_WORKSPACE/ark-${{ inputs.version }}-${{ matrix.flavor }}-linux-x64.zip" | |
zip -Xry $ARCHIVE ark | |
popd | |
- name: Upload archive | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ark-${{ matrix.flavor }}-linux-x64-archive | |
path: ark-${{ inputs.version }}-${{ matrix.flavor }}-linux-x64.zip |