Skip to content

Commit f7d8660

Browse files
committed
add github workflows
1 parent b11a5ee commit f7d8660

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

.github/workflows/build.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
on:
2+
release:
3+
types: [created]
4+
5+
jobs:
6+
release:
7+
name: release ${{ matrix.target }} (with non-required env)
8+
runs-on: ubuntu-latest
9+
if: github.event_name == 'release'
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
include:
14+
- target: x86_64-pc-windows-gnu
15+
archive: zip
16+
- target: x86_64-unknown-linux-musl
17+
archive: tar.gz
18+
- target: x86_64-apple-darwin
19+
archive: zip
20+
defaults:
21+
run:
22+
working-directory: ./crates/bin
23+
steps:
24+
- uses: actions/checkout@master
25+
- name: Compile and release
26+
uses: rust-build/rust-build.action@v1.4.3
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
with:
30+
RUSTTARGET: ${{ matrix.target }}
31+
EXTRA_FILES: "README.md"
32+
ARCHIVE_TYPES: ${{ matrix.archive }}
33+
release_without_not_required:
34+
name: release ${{ matrix.target }}
35+
runs-on: ubuntu-latest
36+
strategy:
37+
fail-fast: true
38+
matrix:
39+
target: [x86_64-pc-windows-gnu]
40+
steps:
41+
- uses: actions/checkout@master
42+
- name: Compile and release
43+
uses: rust-build/rust-build.action@v1.4.3
44+
with:
45+
RUSTTARGET: ${{ matrix.target }}
46+
UPLOAD_MODE: none
47+
- name: Checkout output
48+
run: ls -laR

.github/workflows/rust.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Rust
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
pull_request:
7+
branches: ["master"]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Build Library
19+
run: cargo build --verbose
20+
- name: Build Bin
21+
run: cargo build --verbose
22+
- name: Run tests
23+
run: cargo test --verbose

0 commit comments

Comments
 (0)