Skip to content

Commit

Permalink
ci: separates linux, macos and windows workflows in dedicated files
Browse files Browse the repository at this point in the history
  • Loading branch information
sardylan committed Sep 9, 2024
1 parent dd58eb3 commit e81fe00
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 42 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/builds-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Linux Builds
on:
push:
branches:
- "!main"
- "*"
pull_request:
branches:
- "main"
jobs:
build-gnu:
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
linker: ""
packages: ""
- target: arm-unknown-linux-gnueabihf
linker: arm-linux-gnueabihf-gcc
packages: gcc-arm-linux-gnueabihf
- target: aarch64-unknown-linux-gnu
linker: aarch64-linux-gnu-gcc
packages: gcc-aarch64-linux-gnu
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install required packages
if: matrix.packages != ''
run: apt install --assume-yes ${{ matrix.packages }}
- name: Configure cargo linker to use
if: matrix.linker != ''
run: 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
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Adds rust target
run: rustup target add ${{ matrix.target }}
- name: Build
run: cargo build --release --target=${{ matrix.target }}
24 changes: 24 additions & 0 deletions .github/workflows/builds-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: MacOS Builds
on:
push:
branches:
- "!main"
- "*"
pull_request:
branches:
- "main"
jobs:
build:
strategy:
matrix:
include:
- target: aarch64-apple-darwin
- target: x86_64-apple-darwin
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Adds rust target
run: rustup target add ${{ matrix.target }}
- name: Build
run: cargo build --release --target=${{ matrix.target }}
24 changes: 24 additions & 0 deletions .github/workflows/builds-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Windows Builds
on:
push:
branches:
- "!main"
- "*"
pull_request:
branches:
- "main"
jobs:
build:
strategy:
matrix:
include:
- target: x86_64-pc-windows-msvc
- target: aarch64-pc-windows-msvc
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Adds rust target
run: rustup target add ${{ matrix.target }}
- name: Build
run: cargo build --release --target=${{ matrix.target }}
42 changes: 0 additions & 42 deletions .github/workflows/builds.yml

This file was deleted.

0 comments on commit e81fe00

Please sign in to comment.