-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (72 loc) · 2.52 KB
/
Copy pathtest.yml
File metadata and controls
85 lines (72 loc) · 2.52 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
84
85
name:Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main, development ]
jobs:
test:
runs-on: ${{ matrix.os }}
env:
PYTHONNET_RUNTIME: coreclr
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Install NativeAOT dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y clang zlib1g-dev libkrb5-dev
- name: Publish NativeAOT lib
run: |
cd native/ThermoNativeReader
if [[ "${{ runner.os }}" == "macOS" ]]; then
ARCH=$(uname -m)
if [[ "$ARCH" == "arm64" ]]; then RID="osx-arm64"; else RID="osx-x64"; fi
LIB_FILE="ThermoNativeReader"
elif [[ "${{ runner.os }}" == "Linux" ]]; then
RID="linux-x64"
LIB_FILE="ThermoNativeReader"
else
RID="win-x64"
LIB_FILE="ThermoNativeReader.exe"
fi
dotnet publish -r $RID -c Release -p:PublishAot=true
echo "DYLIB_PATH=$(pwd)/bin/Release/net8.0/$RID/publish/$LIB_FILE" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install dependencies
run: |
python -m venv .venv
source .venv/bin/activate
pip install maturin pytest numpy
pip install fisher-py
- name: Decompress test data
run: gunzip -d -k test_data/*.gz
- name: Download test data
run: |
wget -q -P test_data ftp://ftp.pride.ebi.ac.uk/pride/data/archive/2026/02/PXD066718/20250411_Ast0_500SPD_EVO685_JVO_EV1107_050ng_HEK-CPR_380-980_2Th_1P5ms_OFF_05_20250413081131.raw
wget -q -P test_data https://ftp.pride.ebi.ac.uk/pride/data/archive/2026/02/PXD066944/20250307_AST0_NEO5_JVO_MV50_DR_100SPD_10ng_HEK_Ref_DDA_2Th_1p5ms_10ms_v2Ref_cycle_03.raw
- name: Build and test
run: |
source .venv/bin/activate
# Patch fisher-py
python .github/patch_fisher_py.py
# Copy native lib for bundling
cp ${{ env.DYLIB_PATH }} native_fisher_py/python/native_fisher_py/
# Install the package
pip install ./native_fisher_py
# Parity tests will automatically fall back to ground_truth.json if fisher-py fails
python -m pytest tests