-
Notifications
You must be signed in to change notification settings - Fork 38
53 lines (47 loc) · 1.4 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: CI
on:
push:
branches: ["*.*.x"]
pull_request:
branches: ["*.*.x"]
env:
CARGO_TERM_COLOR: always
jobs:
check-format:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install nightly --profile minimal --component rustfmt --no-self-update
- run: cargo +nightly fmt --all -- --check
lint:
name: Lint
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install stable --profile minimal --component clippy --no-self-update
- run: cargo clippy --all-features -- -D warnings
test:
name: Test
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install stable --profile minimal --no-self-update
- run: cargo test --all-features
build:
name: Build
runs-on: windows-latest
env:
ARCHIVE_NAME: redscript-${{ github.ref_name }}.zip
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install stable --profile minimal --no-self-update
- uses: Swatinem/rust-cache@v2
- run: cargo build --release
- run: .\build\package.ps1 -zipPath ${{ env.ARCHIVE_NAME }}
- uses: actions/upload-artifact@v4
with:
path: |
${{ env.ARCHIVE_NAME }}
target/release/redscript-cli.exe
if-no-files-found: error