-
Notifications
You must be signed in to change notification settings - Fork 38
83 lines (70 loc) · 2.69 KB
/
Copy pathmatprep_artifacts.yml
File metadata and controls
83 lines (70 loc) · 2.69 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
name: Build MATLAB PREP artifacts
# Runs the vendored MATLAB PREP pipeline (tools/matprep) and publishes the
# resulting reference artifacts to a rolling pre-release tagged
# "matprep-artifacts". tests/test_matprep_compare.py downloads them from there.
#
# Triggered manually, or on pushes to main that touch the generator scripts.
# There is intentionally no cron schedule: EEGLAB and PREP are version-pinned in
# config/pipeline_setup.py, so a periodic run would just reproduce identical
# artifacts. Regenerate deliberately via "Run workflow" after bumping a pin.
on:
workflow_dispatch:
push:
branches: [main]
paths:
- 'tools/matprep/**'
- '.github/workflows/matprep_artifacts.yml'
permissions:
contents: write # needed to publish artifacts to the rolling release
defaults:
run:
working-directory: tools/matprep
jobs:
build:
name: Build MATLAB PREP artifacts
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Set up Python 3.12
uses: actions/setup-python@v7
with:
python-version: '3.12'
- name: Install Python dependencies
# mne (eegbci loader) is used only to fetch the test recording; it does
# not touch the artifact values -- MATLAB PREP does all the processing.
run: python -m pip install --upgrade pip mne
- name: Download MATLAB packages and test data
run: python config/pipeline_setup.py
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v3
with:
release: latest
products: Signal_Processing_Toolbox Statistics_and_Machine_Learning_Toolbox
- name: Run MATLAB PREP
uses: matlab-actions/run-command@v3
with:
# run-command starts MATLAB at the repo root, so cd into the tools dir first
command: "cd('tools/matprep');warning('off');run('generate_artifacts.m');exit;"
- name: Upload artifacts to workflow run
uses: actions/upload-artifact@v7
with:
name: matprep-artifacts
path: tools/matprep/artifacts/*
include-hidden-files: true
overwrite: true
- name: Publish artifacts to rolling release
if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v3
with:
tag_name: matprep-artifacts
name: MATLAB PREP artifacts (rolling)
body: >
Reference artifacts generated by the MATLAB PREP pipeline in
`tools/matprep`, consumed by `tests/test_matprep_compare.py`.
This pre-release is updated automatically; do not delete the tag.
prerelease: true
make_latest: false
files: tools/matprep/artifacts/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}