Skip to content

Commit 449b117

Browse files
authored
Merge pull request MindFlavor#5 from gausnes/GithubActions
feat: updating github actions to Bright owned resources
2 parents 0a662cc + d643ea1 commit 449b117

File tree

4 files changed

+113
-129
lines changed

4 files changed

+113
-129
lines changed

.github/workflows/docker.yml

Lines changed: 0 additions & 89 deletions
This file was deleted.

.github/workflows/dockerhub-description.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- master
7+
pull_request:
8+
branches:
9+
- main
10+
- master
11+
release:
12+
types: [ created ]
13+
14+
jobs:
15+
check:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout sources
19+
uses: actions/checkout@v2
20+
21+
- name: Install stable toolchain
22+
uses: actions-rs/toolchain@v1
23+
with:
24+
profile: minimal
25+
toolchain: stable
26+
override: true
27+
28+
- name: Run cargo check
29+
uses: actions-rs/cargo@v1
30+
with:
31+
command: check
32+
33+
test:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout sources
37+
uses: actions/checkout@v2
38+
39+
- name: Install stable toolchain
40+
uses: actions-rs/toolchain@v1
41+
with:
42+
profile: minimal
43+
toolchain: stable
44+
override: true
45+
46+
- name: Run cargo test
47+
uses: actions-rs/cargo@v1
48+
with:
49+
command: test
50+
51+
lints:
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Checkout sources
55+
uses: actions/checkout@v2
56+
57+
- name: Install stable toolchain
58+
uses: actions-rs/toolchain@v1
59+
with:
60+
profile: minimal
61+
toolchain: stable
62+
override: true
63+
components: rustfmt, clippy
64+
65+
- name: Run cargo fmt
66+
uses: actions-rs/cargo@v1
67+
with:
68+
command: fmt
69+
args: --all -- --check
70+
71+
- name: Run cargo clippy
72+
uses: actions-rs/cargo@v1
73+
with:
74+
command: clippy
75+
76+
release:
77+
needs: [check, test, lints]
78+
if: github.event_name == 'release'
79+
runs-on: ubuntu-latest
80+
strategy:
81+
fail-fast: false
82+
matrix:
83+
target: [ x86_64-pc-windows-gnu, x86_64-unknown-linux-musl ]
84+
steps:
85+
- name: Checkout
86+
uses: actions/checkout@v2
87+
- name: Compile and release
88+
uses: rust-build/rust-build.action@v1.2.1
89+
env:
90+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91+
RUSTTARGET: ${{ matrix.target }}
92+
EXTRA_FILES: "README.md LICENSE"

Cargo.lock

Lines changed: 21 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)