ci: Adds missing dependencies #6
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: "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.aarch64-unknown-linux-gnu]\nlinker = "${{ matrix.linker }}"' > .cargo/config | |
- name: Adds rust target | |
run: rustup target add ${{ matrix.target }} | |
- name: Build | |
run: cargo build --release --target=${{ matrix.target }} | |
build-alpine: | |
strategy: | |
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 openssl-dev | |
- name: Adds rust target | |
run: rustup target add ${{ matrix.target }} | |
- name: Build | |
run: cargo build --release --target=${{ matrix.target }} |