Skip to content

Commit

Permalink
First iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoantoniocardoso committed Oct 16, 2024
0 parents commit 5661039
Show file tree
Hide file tree
Showing 16 changed files with 3,364 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Test and Build

on: [push, pull_request]

env:
CARGO_TERM_COLOR: always

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
TARGET: x86_64-unknown-linux-musl

- os: macos-latest
TARGET: x86_64-apple-darwin

- os: windows-latest
TARGET: x86_64-pc-windows-msvc

steps:

- name: Checkout
uses: actions/checkout@v4

- name: Use cached dependencies
uses: Swatinem/rust-cache@v2
with:
key: "${{ matrix.os }}-${{ matrix.TARGET }}-${{ hashFiles('**/Cargo.lock') }}"
shared-key: "shared"

- name: Install build dependencies - Rustup
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable --profile minimal --target ${{ matrix.TARGET }} -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Building lib for ${{ matrix.os }} ${{ matrix.target }}
run: cargo build --release --locked --target ${{matrix.target}} --verbose

- name: Building tests for ${{ matrix.os }} ${{ matrix.target }}
run: cargo test --no-run --locked --target ${{matrix.target}} --verbose

- name: Running tests for ${{ matrix.os }} ${{ matrix.target }}
run: cargo test --locked --target ${{matrix.target}} --verbose
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
Loading

0 comments on commit 5661039

Please sign in to comment.