Skip to content

Commit

Permalink
feat: testing matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
noahmmcgivern committed Dec 5, 2023
1 parent 359c6f2 commit 8d8e3c7
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- "v[0-9]+.[0-9]+.[0-9]+"

permissions:
contents: write
Expand Down Expand Up @@ -234,7 +234,7 @@ jobs:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
username: nmcgivern546
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish Docker Images
run: make docker-publish VERSION=${{ steps.tagname.outputs.tag }}
56 changes: 51 additions & 5 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Testing

on:
push:
branches:
- "master"
pull_request:
branches:
- "!master"
Expand All @@ -19,10 +22,53 @@ jobs:
run: cargo fmt --all --check
- name: Lint
run: cargo clippy
test:
runs-on: ubuntu-latest
dist-binaries:
name: Dist Binaries
needs: lint
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
build: [x86_64-linux, x86_64-linux-musl, x86_64-macos, x86_64-windows]
include:
- build: x86_64-linux
os: ubuntu-latest
rust: stable
target: x86_64-unknown-linux-gnu
cross: false
- build: x86_64-linux-musl
os: ubuntu-latest
rust: stable
target: x86_64-unknown-linux-musl
cross: true
- build: x86_64-macos
os: macos-latest
rust: stable
target: x86_64-apple-darwin
cross: false
# - build: aarch64-macos
# os: macos-13-xlarge
# rust: stable
# target: aarch64-apple-darwin
# cross: false
- build: x86_64-windows
os: windows-2019
rust: stable
target: x86_64-pc-windows-msvc
cross: false
steps:
- uses: actions/checkout@v3
- name: Run tests
run: cargo test --verbose
- name: Checkout sources
uses: actions/checkout@v3
- name: Install ${{ matrix.rust }}-${{ matrix.target }} toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- name: Test
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.cross }}
command: test
args: --release --target ${{ matrix.target }} --verbose

0 comments on commit 8d8e3c7

Please sign in to comment.