Skip to content

Commit

Permalink
Merge pull request #14 from JeromeSchmied/ci
Browse files Browse the repository at this point in the history
ci
  • Loading branch information
JeromeSchmied authored Oct 22, 2024
2 parents 5a20411 + 3612829 commit 779da7c
Showing 1 changed file with 35 additions and 9 deletions.
44 changes: 35 additions & 9 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,47 @@ name: Rust

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-14
target: aarch64-apple-darwin
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: windows-latest
target: x86_64-pc-windows-msvc

steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Checkout repository
uses: actions/checkout@v4

- name: Cache dependencies
uses: swatinem/rust-cache@v2

- name: Build
uses: ClementTsang/[email protected]
with:
args: --release --target ${{ matrix.target }} --verbose
command: build

- name: Run tests
uses: ClementTsang/[email protected]
with:
args: --target ${{ matrix.target }} --verbose
command: test

- name: Upload executable
uses: actions/upload-artifact@v4
with:
name: cgol-tui-${{ matrix.os }}
path: target/${{ matrix.target }}/release/cgol-tui*

0 comments on commit 779da7c

Please sign in to comment.