-
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (61 loc) · 1.75 KB
/
main.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Main
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
reuse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v3
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: cache-deps
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install \
libunshield-dev \
- name: Install Cargo dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: |
cargo install --locked cargo-deny
cargo install --locked cargo-semver-checks
- name: Build
run: cargo build --features visual_data,game_install --verbose
- name: Run tests
run: cargo test --features visual_data,game_install --verbose
- name: Run clippy
run: cargo clippy --features visual_data,game_install
- name: Set up SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.DEPLOY_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
- name: Update Docs
if: github.ref == 'refs/heads/main'
run: |
cargo doc --release --no-deps
rsync -e "ssh -p 38901 -o StrictHostKeyChecking=no" --recursive target/doc/ [email protected]:/srv/http/physis-docs
- name: Run deny-check
run: |
cargo deny check
- name: Run semver-checks
run: |
cargo semver-checks check-release