Skip to content

Commit

Permalink
Merge branch 'main' into chore/assets
Browse files Browse the repository at this point in the history
  • Loading branch information
CompeyDev authored Sep 16, 2023
2 parents c1f3a3a + 821c66c commit cab57b2
Show file tree
Hide file tree
Showing 20 changed files with 1,296 additions and 23 deletions.
65 changes: 55 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,75 @@ on:
pull_request:
workflow_dispatch:

defaults:
run:
shell: bash

jobs:
ci:
name: CI
runs-on: ubuntu-latest

fmt:
name: Check formatting
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
components: rustfmt

- name: Rustfmt
- name: Check Formatting
run: cargo fmt -- --check

ci:
needs: ["fmt"]
strategy:
fail-fast: false
matrix:
include:
- name: Windows x86_64
runner-os: windows-latest
cargo-target: x86_64-pc-windows-msvc

- name: Linux x86_64
runner-os: ubuntu-latest
cargo-target: x86_64-unknown-linux-gnu

- name: macOS x86_64
runner-os: macos-latest
cargo-target: x86_64-apple-darwin

name: CI - ${{ matrix.name }}
runs-on: ${{ matrix.runner-os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
targets: ${{ matrix.cargo-target }}

- name: Build
run: cargo build --locked
run: |
cargo build \
--locked --all-features \
--target ${{ matrix.cargo-target }}
- name: Clippy
run: cargo clippy
- name: Lint
run: |
cargo clippy \
--locked --all-features \
--target ${{ matrix.cargo-target }}
- name: Test
run: cargo test --lib
run: |
cargo test \
--locked --all-features \
--target ${{ matrix.cargo-target }}
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
permissions:
contents: write

defaults:
run:
shell: bash

env:
CARGO_TARGET_DIR: output

Expand All @@ -17,7 +21,7 @@ jobs:
version: ${{ steps.get_version.outputs.value }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get version from manifest
uses: SebRollen/toml-action@9062fbef52816d61278d24ce53c8070440e1e8dd
Expand Down Expand Up @@ -60,29 +64,27 @@ jobs:
runs-on: ${{ matrix.runner-os }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.cargo-target }}

- name: Install tooling (aarch64-unknown-linux-gnu)
- name: Install build tooling (aarch64-unknown-linux-gnu)
if: matrix.cargo-target == 'aarch64-unknown-linux-gnu'
run: |
sudo apt-get update -y
sudo apt-get install -y musl-tools clang llvm
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- name: Build binary
shell: bash
run: |
cargo build \
--locked --release --all-features \
--target ${{ matrix.cargo-target }}
- name: Create binary archive
shell: bash
run: |
mkdir -p staging
if [ "${{ matrix.runner-os }}" = "windows-latest" ]; then
Expand Down Expand Up @@ -113,7 +115,6 @@ jobs:
path: ./binaries

- name: Discover binaries
shell: bash
run: |
cd ./binaries
echo ""
Expand Down
Loading

0 comments on commit cab57b2

Please sign in to comment.