-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (64 loc) · 2.14 KB
/
Copy pathtesting.yaml
File metadata and controls
74 lines (64 loc) · 2.14 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
name: CI testing
on:
workflow_dispatch:
push:
branches:
- 'master'
env:
CARGO_TERM_COLOR: always
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
jobs:
build-release:
permissions:
contents: write
env:
RUST_BACKTRACE: full
strategy:
matrix:
include:
- arch: x86_64-linux-gnu
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact: mpv-handler
- arch: x86_64-windows-msvc
os: windows-latest
target: x86_64-pc-windows-msvc
artifact: mpv-handler.exe
- arch: x86_64-macos
os: macos-latest
target: x86_64-apple-darwin
artifact: mpv-handler
runs-on: ${{matrix.os}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build ${{matrix.target}}
if: ${{ (!startsWith(github.ref, 'refs/tags/')) && (matrix.target != 'x86_64-pc-windows-msvc') }}
timeout-minutes: 120
run: |
mkdir artifacts/
cargo build --release --locked
mv target/release/${{matrix.artifact}} artifacts/mpv-handler-${{matrix.arch}}
mv *.md scripts/config.toml.template LICENSE artifacts/
tar -czf mpv-handler-${{matrix.arch}}.tar.gz artifacts/*
- name: Build ${{matrix.target}}
if: ${{ (!startsWith(github.ref, 'refs/tags/')) && (matrix.target == 'x86_64-pc-windows-msvc') }}
run: |
cargo build --release --locked
cargo build -p handler-config --release --locked
mkdir artifacts/
mv target/release/${{matrix.artifact}} artifacts/
mv target/release/handler-config.exe artifacts/
mv scripts/config.toml.template artifacts/
mv *.md artifacts/
mv LICENSE artifacts/
compress-archive -path artifacts/* -destination artifacts/mpv-handler-${{matrix.arch}}.zip
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: mpv-handler-${{matrix.arch}}
path: |
artifacts/*.zip
./*.tar.gz
compression-level: 5
retention-days: 3