44 pull_request :
55 branches : [ "main" ]
66 paths :
7- - ' minimappers2/src/'
8- - ' minimappers2/Cargo.toml'
7+ - minimappers2/src/
8+ - minimappers2/Cargo.toml
9+ - minimappers2/**
10+ - .github/workflows/build-test-rust-minimappers2.yaml
11+
12+ concurrency :
13+ group : ${{ github.workflow }}-${{ github.ref }}
14+ cancel-in-progress : true
915
1016env :
17+ RUSTFLAGS : -C debuginfo=0 # Do not produce debug symbols to keep memory usage down
18+ RUST_BACKTRACE : 1
19+ PYTHONUTF8 : 1
1120 CARGO_TERM_COLOR : always
1221
22+ defaults :
23+ run :
24+ working-directory : minimappers2
25+ shell : bash
26+
1327jobs :
14- test :
15- runs-on : ubuntu-latest
28+ test-python :
29+ runs-on : ${{ matrix.os }}
30+ strategy :
31+ fail-fast : false
32+ matrix :
33+ os : [ubuntu-latest]
34+ python-version : ['3.9', '3.12', '3.13']
35+ include :
36+ - os : windows-latest
37+ python-version : ' 3.13'
1638 steps :
1739 - uses : actions/checkout@v4
1840 with :
1941 submodules : ' recursive'
20- - run : cd minimappers2
42+ - name : Set up Python
43+ uses : actions/setup-python@v5
44+ with :
45+ python-version : ${{ matrix.python-version }}
46+
47+ - name : Create virtual environment
48+ env :
49+ BIN : ${{ matrix.os == 'windows-latest' && 'Scripts' || 'bin' }}
50+ run : |
51+ python -m venv .venv
52+ echo "$GITHUB_WORKSPACE/minimappers2/.venv/$BIN" >> $GITHUB_PATH
53+ echo "VIRTUAL_ENV=$GITHUB_WORKSPACE/minimappers2/.venv" >> $GITHUB_ENV
54+
55+ - name : Set up Rust
56+ run : rustup show
57+
58+ - name : Cache Rust
59+ uses : Swatinem/rust-cache@v2
60+ with :
61+ workspaces : minimappers2
62+ save-if : ${{ github.ref_name == 'main' }}
63+
64+ - name : Install Python dependencies
65+ run : |
66+ pip install uv
67+ uv pip install maturin
68+
69+ - name : Install minimappers2
70+ run : maturin develop
71+
2172 - name : Build
2273 run : cargo build --verbose
74+
2375 - name : Run tests
24- run : cargo test --verbose
25-
26- build-manylinux-x64_64 :
27- runs-on : ubuntu-latest
28- steps :
29- - uses : actions/checkout@v4
30- with :
31- submodules : ' recursive'
32- - uses : actions/setup-python@v4
33- with :
34- python-version : ' 3.9'
35-
36- - name : Test build
37- uses : messense/maturin-action@v1
38- env :
39- RUSTFLAGS : -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma
40- with :
41- rust-toolchain : nightly-2025-01-08
42- maturin-version : ' 1.8.0'
43- command : build
44- args : -m minimappers2/Cargo.toml
76+ run : cargo test --verbose
0 commit comments