Skip to content

Build

Build #8

Workflow file for this run

name: Build
on: workflow_dispatch
jobs:
build:
strategy:
fail-fast: false
matrix:
# target: [x86_64-unknown-linux-musl, aarch64-unknown-linux-musl]
target: [x86_64-unknown-linux-musl]
include:
- target: x86_64-unknown-linux-musl
platform: linux/amd64
runner: ubuntu-latest
# - target: aarch64-unknown-linux-musl
# platform: linux/arm64
# runner: ubuntu-latest
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- name: Install asciidoctor
run: |
sudo apt update
sudo apt -y install asciidoctor
- name: Build Linux
run: |
docker run --platform ${{ matrix.platform }} --rm -t \
-v $HOME/.cargo/registry/:/root/.cargo/registry \
-v "$(pwd)":/volume \
clux/muslrust:stable \
env CFLAGS=-Os cargo build --release --target ${{ matrix.target }}
- name: Build man pages
run: |
asciidoctor -b manpage doc/fcd.1.adoc
asciidoctor -b manpage doc/fcd-view.1.adoc
- name: Package
run: |
mkdir fcd
cp fcd.{sh,fish} fcd/
cp doc/fcd{,-view}.1 fcd/
cp target/${{ matrix.target }}/release/fcd fcd/
tar cvzf fcd-${{ matrix.target }}.tar.gz fcd/
- name: Upload
uses: actions/upload-artifact@v4
with:
name: fcd-${{ matrix.target }}
path: fcd-${{ matrix.target }}.tar.gz
if-no-files-found: error
download:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download All Artifacts
uses: actions/download-artifact@v4
- name: Display structure of downloaded files
run: ls -R