-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (55 loc) · 1.75 KB
/
build.yml
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
54
55
56
57
58
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