-
Notifications
You must be signed in to change notification settings - Fork 0
128 lines (122 loc) · 4.22 KB
/
cd.yaml
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: "test-and-build-on-pr"
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
strategy:
fail-fast: false
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Create dist dir
run: mkdir dist
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 16
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: Lint
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path ./src-tauri/Cargo.toml
- name: Execute tests
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path ./src-tauri/Cargo.toml
- uses: taiki-e/install-action@cargo-llvm-cov
- name: Collect Coverage
run: cd src-tauri && cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: Coveralls
uses: coverallsapp/github-action@v2
build-debug:
if: ${{ github.event.label.name == 'testbuild' }}
needs: test
strategy:
fail-fast: false
matrix:
platform: [ubuntu-20.04, windows-2022, macos-latest] # TODO add all platforms
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 16
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: install app dependencies and build with debug
run: npm install && npm run deploy-debug
- name: Upload Linux debug artifact
uses: actions/upload-artifact@v3
if: matrix.platform == 'ubuntu-20.04'
with:
name: beiboot-desktop-${{ runner.os }}-${{ runner.arch }}-debug
path: |
src-tauri/target/debug/bundle/appimage/getdeck-desktop_0.1.0_amd64.AppImage
/src-tauri/target/debug/bundle/deb/getdeck-desktop_0.1.0_amd64.deb
retention-days: 5
- name: Upload debug artifact
uses: actions/upload-artifact@v3
if: matrix.platform != 'ubuntu-20.04'
with:
name: beiboot-desktop-${{ runner.os }}-${{ runner.arch }}-debug
path: |
src-tauri/target/debug/bundle/
retention-days: 5
build:
if: ${{ github.event.label.name == 'testbuild' }}
needs: test
strategy:
fail-fast: false
matrix:
platform: [ubuntu-20.04, windows-2022, macos-latest] # TODO add all platforms
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 16
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: build for prod
run: npm install && npm run deploy
- name: Upload Linux prod artifact
uses: actions/upload-artifact@v3
if: matrix.platform == 'ubuntu-20.04'
with:
name: beiboot-desktop-${{ runner.os }}-${{ runner.arch }}
path: |
src-tauri/target/release/bundle/appimage/getdeck-desktop_0.1.0_amd64.AppImage
/src-tauri/target/release/bundle/deb/getdeck-desktop_0.1.0_amd64.deb
retention-days: 5
- name: Upload prod Artifact
uses: actions/upload-artifact@v3
if: matrix.platform != 'ubuntu-20.04'
with:
name: beiboot-desktop-${{ runner.os }}-${{ runner.arch }}
path: |
src-tauri/target/release/bundle/
retention-days: 5