Skip to content

Commit

Permalink
adding github actions test and publish
Browse files Browse the repository at this point in the history
  • Loading branch information
wdecoster committed Mar 2, 2024
1 parent 5028b9f commit 2f97eba
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Publish

on:
push:
tags:
- '*'

jobs:
publish:
name: Publish for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
name: [
linux,
# windows,
macos
]

include:
- name: linux
os: ubuntu-latest
artifact_name: target/release/STRdust
asset_name: STRdust-linux
# - name: windows
# os: windows-latest
# artifact_name: target/release/<name>.exe
# asset_name: <name>-windows
- name: macos
os: macos-latest
artifact_name: target/release/STRdust
asset_name: STRdust-macos

steps:
- uses: actions/checkout@v1

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- name: Build
run: cargo build --release --locked

- name: Upload binaries to release
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.asset_name }}
path: ${{ matrix.artifact_name }}
22 changes: 22 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: test

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

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: ubuntu-latest

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

0 comments on commit 2f97eba

Please sign in to comment.