-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.39 KB
/
Copy pathbuild.yml
File metadata and controls
58 lines (48 loc) · 1.39 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
name: Build
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
permissions:
contents: read
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
runs-on: ${{ matrix.os }}
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
RUSTFLAGS: -D warnings
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install gtk lib
run: sudo apt install libwebkit2gtk-4.1-dev
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: Run tests
run: cargo test --locked
- name: Clippy
run: cargo clippy --locked -- -D warnings
- name: Check formatting
run: cargo fmt --check
- name: Build release
run: cargo build --locked --release
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: artifact-${{ matrix.os }}
path: |
target/release/onedrive_slideshow*
target/**/release/onedrive_slideshow*
if-no-files-found: error