Skip to content

Commit

Permalink
[CI] macos and linux builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jgarzik committed Feb 22, 2024
1 parent b1b2574 commit 4061b67
Showing 1 changed file with 32 additions and 5 deletions.
37 changes: 32 additions & 5 deletions .github/workflows/TestingCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,46 @@ name: Rust

on: [push]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1

jobs:
build:
linux-ubuntu:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Install deps
run: sudo apt-get -y install protobuf-compiler
- name: Build
run: cargo build --verbose
run: cargo build --release --verbose
- name: Run tests
run: cargo test --verbose
run: cargo test --release --verbose

macos-homebrew:

runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: sfackler/actions/rustup@master
- run: echo "version=$(rustc --version)" >> $GITHUB_OUTPUT
id: rust-version
- uses: actions/cache@v4
with:
path: ~/.cargo/registry/index
key: index-${{ runner.os }}-${{ github.run_number }}
restore-keys: |
index-${{ runner.os }}-
- run: cargo generate-lockfile
- uses: actions/cache@v4
with:
path: ~/.cargo/registry/cache
key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
- run: cargo fetch
- run: cargo build --release --verbose
- run: cargo run --release --verbose

0 comments on commit 4061b67

Please sign in to comment.