-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (51 loc) · 1.81 KB
/
build.yml
File metadata and controls
53 lines (51 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Build
on: [workflow_dispatch, workflow_call]
jobs:
build:
strategy:
fail-fast: false
matrix:
target: [x86_64-unknown-linux-musl, aarch64-unknown-linux-musl]
include:
- target: x86_64-unknown-linux-musl
platform: linux/amd64
simple_target: Linux-x86_64
runner: ubuntu-latest
- target: aarch64-unknown-linux-musl
platform: linux/arm64
simple_target: Linux-arm64
runner: ubuntu-24.04-arm
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 -p fcd/{bin,share/{man/man1,doc/fcd,fcd,licenses/fcd}}
cp target/${{ matrix.target }}/release/fcd fcd/bin/
cp doc/fcd{,-view}.1 fcd/share/man/man1/
cp fcd.{sh,fish} fcd/share/fcd/
cp README.md fcd/share/doc/fcd/
cp CHANGELOG.md fcd/share/doc/fcd/
cp LICENSE fcd/share/licenses/fcd/
tar cvzf fcd-${{ matrix.simple_target }}.tar.gz fcd/
- name: Upload
uses: actions/upload-artifact@v4
with:
name: fcd-${{ matrix.simple_target }}
path: fcd-${{ matrix.simple_target }}.tar.gz
if-no-files-found: error