-
Notifications
You must be signed in to change notification settings - Fork 124
60 lines (60 loc) · 1.73 KB
/
test.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
name: Test
permissions: {}
on:
pull_request:
paths-ignore:
- '**.md'
- 'screenshots/**'
- 'windows/**'
push:
paths-ignore:
- '**.md'
- 'screenshots/**'
- 'windows/**'
workflow_dispatch:
inputs:
debug:
description: Enable debug
type: boolean
required: false
default: false
os:
description: Debug OS
required: true
type: choice
options: [ubuntu-latest, macos-latest, all]
jobs:
transcribe:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
shell: [shell, shell-bin]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: azuwis/nix-action@main
with:
key: pianotrans-${{ matrix.shell }}-${{ hashFiles('flake.*', 'nix/**') }}
debug: >-
${{ github.event_name == 'workflow_dispatch'
&& inputs.debug
&& matrix.shell == 'shell'
&& (inputs.os == 'all'|| inputs.os == matrix.os)
}}
credential: ${{ secrets.TTYD_CREDENTIAL }}
- uses: cachix/cachix-action@v12
with:
name: azuwis
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
# pushFilter: (-source$|\.whl$)
- name: Build nix devShell
run: |
# build nix devShell, and create profile to prevent gc
echo "Build nix devShell"
nix -L develop .#${{ matrix.shell }} --profile ~/.local/state/nix/profiles/shell --command true
- name: Test transcribe
run: |
nix -L develop .#${{ matrix.shell }} --command ./PianoTrans.py --cli test/cut_liszt.opus test/cut_liszt.opus test/cut_liszt.opus
test -e test/cut_liszt.opus.mid
- uses: azuwis/nix-action@post