-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (57 loc) · 1.76 KB
/
builds-linux.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
name: "Builds - Linux"
on:
push:
branches:
- "!main"
- "*"
pull_request:
branches:
- "main"
jobs:
build-gnu:
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
linker: ""
packages: ""
- target: arm-unknown-linux-gnueabihf
linker: arm-linux-gnueabihf-gcc
packages: libssl-dev gcc-arm-linux-gnueabihf
- target: aarch64-unknown-linux-gnu
linker: aarch64-linux-gnu-gcc
packages: libssl-dev gcc-aarch64-linux-gnu
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install required packages
if: matrix.packages != ''
run: sudo apt install --assume-yes ${{ matrix.packages }}
- name: Configure cargo linker to use
if: matrix.linker != ''
run: mkdir .cargo && echo -ne '[target.${{ matrix.target }}]\nlinker = "${{ matrix.linker }}"' > .cargo/config.toml
- name: Adds rust target
run: rustup target add ${{ matrix.target }}
- name: Build
run: cargo build --release --target=${{ matrix.target }}
build-alpine:
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-musl
# - target: arm-unknown-linux-musleabihf
# - target: aarch64-unknown-linux-musl
runs-on: ubuntu-latest
container: rust:alpine
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install required packages
run: apk add perl alpine-sdk musl-dev
- name: Adds rust target
run: rustup target add ${{ matrix.target }}
- name: Build
run: cargo build --release --target=${{ matrix.target }}