-
Notifications
You must be signed in to change notification settings - Fork 15
130 lines (126 loc) · 3.98 KB
/
pullrequest.yml
File metadata and controls
130 lines (126 loc) · 3.98 KB
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
129
130
name: Pull-Request CI
on:
pull_request:
branches: [release, develop]
env:
BEFORE_SHA: ${{ github.event.before }}
TARGET_BRANCH: ${{ github.event.pull_request.base.ref }}
jobs:
build_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache multiple paths
id: cache-package
uses: actions/cache@v3
with:
path: |
**/node_modules
~/.cache/Cypress
key: ${{ runner.os }}-${{ hashFiles('package.json') }}-1
- name: Use Node.js 16
uses: actions/setup-node@v1
with:
node-version: 16
- run: npm install
if: steps.cache-package.outputs.cache-hit != 'true'
- name: Run Affected Lint
shell: bash
run: npm run affected:lint -- --base=origin/$TARGET_BRANCH
- run: npm run build:prepare
- run: npm run test:ci
- name: Run Cypress tests 🧪
uses: cypress-io/github-action@v2
with:
install: false
command: npm run test:cypress
build_executables:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Cache multiple paths
id: cache-package
uses: actions/cache@v3
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json') }}
- name: Use Node.js 16
uses: actions/setup-node@v1
with:
node-version: 16
- run: npm install
if: steps.cache-package.outputs.cache-hit != 'true'
- run: npm run build:prepare
- run: npm run build:pkg -- -o release/out/memebox
- run: release/out/memebox --cli-test-mode=true --config=./release/config
- run: npm run electron:build:only
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}_output
path: |
release/out/
release-electron/
!release/config/**
!release-electron/*-unpacked/**
!release-electron/mac/**
build_tauri:
# install webkit deps breaks, so disabling for now
if: false
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Cache multiple paths
id: cache-package
uses: actions/cache@v3
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json') }}
- name: Use Node.js 16
uses: actions/setup-node@v1
with:
node-version: 16
- run: npm install
if: steps.cache-package.outputs.cache-hit != 'true'
- name: Setup Rust
run: rustup install stable
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
- name: Install WebKit dependencies
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libwebkit2gtk-4.0-dev
- name: Build base app
run: npm run build:prepare
- name: Build sidecar (Linux)
if: ${{ runner.os == 'Linux' }}
run: npm run build:linux
- name: Build sidecar (macOS)
if: ${{ runner.os == 'macOS' }}
run: npm run build:macos
- name: Build sidecar (Windows)
if: ${{ runner.os == 'Windows' }}
run: npm run build:windows
- name: Build Tauri app
run: npm run tauri:build
- uses: actions/upload-artifact@v4
with:
name: tauri-${{ matrix.os }}
path: |
src-tauri/target/release/bundle/dmg/memebox*.dmg
src-tauri/target/release/bundle/appimage/memebox*.AppImage
src-tauri/target/release/bundle/deb/memebox*.deb
src-tauri/target/release/bundle/msi/memebox*.msi