Skip to content

Build Ark Linux Release #10

Build Ark Linux Release

Build Ark Linux Release #10

Workflow file for this run

name: "Build Ark Linux Release"
on:
workflow_call:
inputs:
version:
required: false
description: "The Ark version"
default: ${{ github.sha }}
type: string
workflow_dispatch:
jobs:
build_linux:
name: Build Linux
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"
LICENSE="$GITHUB_WORKSPACE/LICENSE"
NOTICE="$GITHUB_WORKSPACE/crates/ark/NOTICE"
zip -Xry $ARCHIVE ark $LICENSE $NOTICE
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