File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : FreeBSD Rust Build
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches :
7+ - main
8+ pull_request :
9+
10+ jobs :
11+ freebsd :
12+ name : FreeBSD ${{ matrix.freebsd-version }} / ${{ matrix.target }}
13+ runs-on : ubuntu-latest
14+
15+ strategy :
16+ fail-fast : false
17+ matrix :
18+ include :
19+ - freebsd-version : " 14.2"
20+ target : x86_64-unknown-freebsd
21+ - freebsd-version : " 15.0"
22+ target : x86_64-unknown-freebsd
23+
24+ steps :
25+ - name : Checkout
26+ uses : actions/checkout@v4
27+
28+ - name : Build on FreeBSD ${{ matrix.freebsd-version }}
29+ uses : vmactions/freebsd-vm@v1
30+ with :
31+ release : ${{ matrix.freebsd-version }}
32+ usesh : true
33+ prepare : |
34+ pkg install -y curl git bash gmake pkgconf
35+ curl https://sh.rustup.rs -sSf | sh -s -- -y
36+ run : |
37+ set -e
38+ . "$HOME/.cargo/env"
39+
40+ rustup default stable
41+ rustc --version
42+ cargo --version
43+
44+ cargo build --release
45+
46+ mkdir -p dist
47+ BIN_NAME="your-binary-name"
48+
49+ cp "target/release/$BIN_NAME" "dist/${BIN_NAME}-freebsd-${{ matrix.freebsd-version }}-x86_64"
50+ tar -C dist -czf "dist/${BIN_NAME}-freebsd-${{ matrix.freebsd-version }}-x86_64.tar.gz" "${BIN_NAME}-freebsd-${{ matrix.freebsd-version }}-x86_64"
51+
52+ - name : Upload artifact
53+ uses : actions/upload-artifact@v4
54+ with :
55+ name : freebsd-${{ matrix.freebsd-version }}-x86_64
56+ path : dist/*.tar.gz
You can’t perform that action at this time.
0 commit comments