-
Notifications
You must be signed in to change notification settings - Fork 9
106 lines (90 loc) · 3.5 KB
/
pullrequest.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
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
name: Artemis PR Actions
on:
pull_request:
branches:
- "main"
env:
CARGO_TERM_COLOR: always
jobs:
build-pr:
strategy:
fail-fast: false
matrix:
info:
- { os: "macos-latest", target: "aarch64-apple-darwin", cross: false }
- {
os: "ubuntu-latest",
target: "x86_64-unknown-linux-gnu",
cross: false,
}
- {
os: "windows-latest",
target: "x86_64-pc-windows-msvc",
cross: false,
}
runs-on: ${{ matrix.info.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy
targets: ${{ matrix.info.target }}
- name: Setup NodeJS toolchain
uses: actions/setup-node@v4
- name: Install TailwindCSS
run: npm install -D tailwindcss
- name: Install DaisyUI
run: npm install -D daisyui@latest
- name: Install TailwindCSS Typography
run: npm install -D @tailwindcss/typography
- name: Tauri build dependencies on Linux
if: matrix.info.os == 'ubuntu-latest'
run: sudo apt update && sudo apt install libgtk-3-dev libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev
- name: Setup Podman user config directory
if: matrix.info.os == 'ubuntu-latest'
run: mkdir -p ~/.config/containers
- name: Register docker.io for Podman
if: matrix.info.os == 'ubuntu-latest'
run: echo "unqualified-search-registries = ['docker.io']" > ~/.config/containers/registries.conf
- name: Download OpenSearch on Linux
if: matrix.info.os == 'ubuntu-latest'
run: podman run -it -p 9200:9200 -p 9600:9600 -e OPENSEARCH_INITIAL_ADMIN_PASSWORD="Ughsocomplex123567890!" -e "discovery.type=single-node" --name opensearch-node -d opensearchproject/opensearch:latest
- name: Enable Rust cache
uses: Swatinem/[email protected]
with:
save-if: false
- name: Fmt Check
run: cargo fmt -- --check
- name: Install just runner
uses: taiki-e/install-action@just
- name: Run clippy action to produce annotations on Windows
if: matrix.info.os == 'windows-latest'
run: just --shell pwsh.exe --shell-arg -c
- name: Run clippy action to produce annotations non-Windows
if: matrix.info.os != 'windows-latest'
run: just
- name: Build tests (macOS)
if: matrix.info.os == 'macOS-latest'
run: sudo cargo test --no-run --release
- name: Run tests (macOS)
if: matrix.info.os == 'macOS-latest'
run: sudo cargo test --release
- name: Setup Rust for root (Linux)
if: matrix.info.os == 'ubuntu-latest'
run: sudo env "PATH=$PATH" rustup default stable
- name: Build tests (Linux)
if: matrix.info.os == 'ubuntu-latest'
run: sudo env "PATH=$PATH" cargo test --no-run --release
- name: Run tests (Linux)
if: matrix.info.os == 'ubuntu-latest'
run: sudo env "PATH=$PATH" cargo test --release
- name: Build tests (Windows)
if: matrix.info.os == 'windows-latest'
run: cargo test --no-run --release
- name: Run tests (Windows)
if: matrix.info.os == 'windows-latest'
run: cargo test --release