Skip to content

Commit b3d9033

Browse files
committed
more CI fixes
1 parent 16b296c commit b3d9033

File tree

2 files changed

+80
-29
lines changed

2 files changed

+80
-29
lines changed

.github/workflows/build-test-rust-minimappers2.yaml

Lines changed: 58 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,73 @@ on:
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

1016
env:
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+
1327
jobs:
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

.github/workflows/create-python-release.yaml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,33 @@
33
name: Create Python release
44

55
on:
6-
push:
7-
tags:
8-
- py-*
6+
workflow_dispatch:
7+
inputs:
8+
# Latest commit to include with the release. If omitted, use the latest commit on the main branch.
9+
sha:
10+
description: Commit SHA
11+
type: string
12+
# Create the sdist and build the wheels, but do not publish to PyPI / GitHub.
13+
dry-run:
14+
description: Dry run
15+
type: boolean
16+
default: false
17+
18+
env:
19+
PYTHON_VERSION: '3.9'
20+
PYTHON_VERSION_WIN_ARM64: '3.11' # ARM64 Windows doesn't have older versions
21+
CARGO_INCREMENTAL: 0
22+
CARGO_NET_RETRY: 10
23+
RUSTUP_MAX_RETRIES: 10
924

1025
defaults:
1126
run:
1227
shell: bash
1328

29+
concurrency:
30+
group: ${{ github.workflow }}-${{ github.ref }}
31+
cancel-in-progress: true
32+
1433
jobs:
1534
manylinux-x64_64:
1635
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)