Skip to content

Commit 7941a12

Browse files
committed
ci: Fix CI for Python dependency
1 parent 8014faf commit 7941a12

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

.github/workflows/build.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: build
22

33
on: push
44

5+
env:
6+
ENABLE_PYO3: 1
7+
58
jobs:
69
build:
710
strategy:
@@ -13,8 +16,10 @@ jobs:
1316
include:
1417
- target: x86_64-unknown-linux-gnu
1518
cross: ""
19+
image: "vtavernier/cross:x86_64-bullseye"
1620
- target: arm-unknown-linux-gnueabihf
1721
cross: arm-linux-gnueabihf-
22+
image: "vtavernier/cross:raspberrypi"
1823

1924
runs-on: ubuntu-20.04
2025

@@ -48,7 +53,7 @@ jobs:
4853
args: --release --target=${{ matrix.target }}
4954

5055
- name: Strip resulting binary
51-
run: docker run -v ${{ github.workspace }}:/src rustembedded/cross:${{ matrix.target }} ${{ matrix.cross }}strip /src/target/${{ matrix.target }}/release/hyperiond
56+
run: docker run -v ${{ github.workspace }}:/src ${{ matrix.image }} ${{ matrix.cross }}strip /src/target/${{ matrix.target }}/release/hyperiond
5257

5358
- name: Prepare release
5459
run: |

.github/workflows/release.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
tags: ['v*']
66

7+
env:
8+
ENABLE_PYO3: 1
9+
710
jobs:
811
release:
912
strategy:
@@ -15,8 +18,10 @@ jobs:
1518
include:
1619
- target: x86_64-unknown-linux-gnu
1720
cross: ""
21+
image: "vtavernier/cross:x86_64-bullseye"
1822
- target: arm-unknown-linux-gnueabihf
1923
cross: arm-linux-gnueabihf-
24+
image: "vtavernier/cross:raspberrypi"
2025

2126
runs-on: ubuntu-20.04
2227

@@ -42,7 +47,7 @@ jobs:
4247
args: --release --target=${{ matrix.target }}
4348

4449
- name: Strip resulting binary
45-
run: docker run -v ${{ github.workspace }}:/src rustembedded/cross:${{ matrix.target }} ${{ matrix.cross }}strip /src/target/${{ matrix.target }}/release/hyperiond
50+
run: docker run -v ${{ github.workspace }}:/src ${{ matrix.image }} ${{ matrix.cross }}strip /src/target/${{ matrix.target }}/release/hyperiond
4651

4752
- name: Prepare release
4853
run: |

Cross.toml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[build.env]
2+
passthrough = ["ENABLE_PYO3"]
3+
4+
[target.x86_64-unknown-linux-gnu]
5+
image = "vtavernier/cross:x86_64-bullseye"
6+
7+
[target.arm-unknown-linux-gnueabihf]
8+
image = "vtavernier/cross:raspberrypi"

0 commit comments

Comments
 (0)