Build #3
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: Build | |
on: workflow_dispatch | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
# platform: [linux/amd64, linux/arm64] | |
platform: [linux/amd64] | |
include: | |
- platform: linux/amd64 | |
target: x86_64-unknown-linux-musl | |
runner: ubuntu-latest | |
# - platform: linux/arm64 | |
# target: aarch64-unknown-linux-musl | |
# runner: ubuntu-latest | |
runs-on: ${{ matrix.runner }} | |
steps: | |
- uses: actions/checkout@v4 | |
- 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: | | |
gem install asciidoctor | |
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 |