Skip to content

Commit 6efd8a4

Browse files
committed
fix rust ci
1 parent 3d0f394 commit 6efd8a4

File tree

5 files changed

+91
-67
lines changed

5 files changed

+91
-67
lines changed

.github/workflows/build.sh

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,8 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
3838
apt update
3939
apt install -y clang-11
4040
else
41-
# centos
42-
# https://developers.redhat.com/blog/2018/07/07/yum-install-gcc7-clang#
43-
yum install -y llvm-toolset-7
44-
source /opt/rh/llvm-toolset-7/enable
41+
# almalinux
42+
yum install -y llvm-toolset
4543
fi
4644
elif [[ "$OSTYPE" == "darwin"* ]]; then
4745
echo "Skip on MacOS. Assuming you have CLang and LLVM installed."
@@ -95,13 +93,13 @@ echo "::endgroup::"
9593
echo
9694

9795
# ##############################################
98-
for PYTHON_INTERPRETER in "${PYTHON_INTERPRETERS[@]}"
99-
do
100-
echo "::group::Building for Python $PYTHON_INTERPRETER"
96+
PYTHON_INTERPRETERS_JOINED=$(IFS=' ' ; echo "${PYTHON_INTERPRETERS[*]/#/-i }")
10197

102-
echo "Run: maturin build -r -o dist -i $PYTHON_INTERPRETER --target $target"
103-
"maturin" build -r -o dist -i "$PYTHON_INTERPRETER" --target $target
98+
echo "::group::Building for Python ${PYTHON_INTERPRETERS[@]}"
10499

105-
echo "::endgroup::"
106-
echo
107-
done
100+
echo "Run: maturin build -r -o dist $PYTHON_INTERPRETERS_JOINED --target $target"
101+
cd rust
102+
maturin build -r -o dist $PYTHON_INTERPRETERS_JOINED --target $target
103+
104+
echo "::endgroup::"
105+
echo

.github/workflows/ci-rust.yml

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
uses: actions/setup-python@v4
2121
with:
2222
python-version: |
23+
3.14
2324
3.13
2425
3.12
2526
3.11
@@ -56,7 +57,7 @@ jobs:
5657
name: wheels-${{ matrix.platform }}
5758
path: rust/dist
5859

59-
build-manylinux:
60+
build-manylinux-x86_64:
6061
runs-on: ubuntu-latest
6162
steps:
6263
- uses: actions/checkout@v3
@@ -71,19 +72,41 @@ jobs:
7172
-e EXTRA_PATH=/opt/python/cp310-cp310/bin \
7273
-e PYTHON_ROOT_DIR=/opt/python \
7374
-e CARGO_NET_GIT_FETCH_WITH_CLI=false \
74-
quay.io/pypa/manylinux2014_x86_64:latest \
75+
quay.io/pypa/manylinux_2_34_x86_64:latest \
7576
bash /project/.github/workflows/build.sh -t x86_64-unknown-linux-gnu
7677
- name: Upload wheels
7778
uses: actions/upload-artifact@v4
7879
with:
79-
name: wheels-manylinux
80+
name: wheels-manylinux-x86_64
81+
path: rust/dist
82+
build-manylinux-aarch64:
83+
runs-on: ubuntu-24.04-arm
84+
steps:
85+
- uses: actions/checkout@v3
86+
- name: Cache Rust target directory
87+
uses: actions/cache@v3
88+
with:
89+
key: ${{ runner.os }}-manylinux
90+
path: rust/target
91+
- name: Build wheels
92+
run: |
93+
docker run --rm -w /project/rust -v $(pwd):/project \
94+
-e EXTRA_PATH=/opt/python/cp310-cp310/bin \
95+
-e PYTHON_ROOT_DIR=/opt/python \
96+
-e CARGO_NET_GIT_FETCH_WITH_CLI=false \
97+
quay.io/pypa/manylinux_2_34_aarch64:latest \
98+
bash /project/.github/workflows/build.sh -t aarch64-unknown-linux-gnu
99+
- name: Upload wheels
100+
uses: actions/upload-artifact@v4
101+
with:
102+
name: wheels-manylinux-aarch64
80103
path: rust/dist
81104

82105
release-crate:
83106
name: Release Crates.io
84107
runs-on: ubuntu-22.04
85108
# if: ${{ startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/master') || startsWith(github.ref, 'refs/heads/dev-ci') }}
86-
needs: [build, build-manylinux]
109+
needs: [build, build-manylinux-x86_64, build-manylinux-aarch64]
87110
steps:
88111
- uses: actions/checkout@v3
89112
- name: Publish to Crates
@@ -98,11 +121,15 @@ jobs:
98121
name: Release PyPI.org
99122
runs-on: ubuntu-22.04
100123
# if: ${{ startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/master') || startsWith(github.ref, 'refs/heads/dev-ci') }}
101-
needs: [build, build-manylinux]
124+
needs: [build, build-manylinux-x86_64, build-manylinux-aarch64]
102125
steps:
103126
- uses: actions/download-artifact@v4
104127
with:
105-
name: wheels-manylinux
128+
name: wheels-manylinux-x86_64
129+
path: rust/dist
130+
- uses: actions/download-artifact@v4
131+
with:
132+
name: wheels-manylinux-aarch64
106133
path: rust/dist
107134
- uses: actions/download-artifact@v4
108135
with:

.github/workflows/manual_build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ docker run --rm -w /project -v $(pwd):/project \
1212
-e EXTRA_PATH=/opt/python/cp310-cp310/bin \
1313
-e PYTHON_ROOT_DIR=/opt/python \
1414
-e CARGO_NET_GIT_FETCH_WITH_CLI=false \
15-
quay.io/pypa/manylinux_2_39_aarch64:latest \
15+
quay.io/pypa/manylinux_2_34_aarch64:latest \
1616
bash /project/.github/workflows/build.sh -t aarch64-unknown-linux-gnu

rust/Cargo.lock

Lines changed: 44 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/Cargo.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "kgdata_core"
3-
version = "4.0.2"
3+
version = "4.0.3"
44
edition = "2021"
55
readme = "README.md"
66
homepage = "https://github.com/binh-vu/kgdata"
@@ -23,9 +23,7 @@ bzip2 = "0.4.3"
2323
clap = { version = "4.4.6", features = ["derive"] }
2424
ctrlc = { version = "3.4.1", features = ["termination"] }
2525
env_logger = "0.9.0"
26-
flate2 = { version = "1.0.24", features = [
27-
"zlib-ng",
28-
], default-features = false }
26+
flate2 = { version = "1.1.2", features = ["zlib-ng"], default-features = false }
2927
glob = "0.3.1"
3028
hashbrown = { version = "0.14.0", features = ["serde", "rayon"] }
3129
itertools = "0.11.0"
@@ -38,7 +36,7 @@ pyo3 = { version = "0.19.2", features = [
3836
"hashbrown",
3937
] }
4038
rayon = "1.7.0"
41-
rocksdb = "0.20.1"
39+
rocksdb = "0.24.0"
4240
serde = { version = "1.0.137", features = ["derive"] }
4341
serde_json = "1.0.81"
4442
shared_memory = "0.12.4"

0 commit comments

Comments
 (0)