Skip to content

Commit

Permalink
experiment with custom docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementTsang committed May 25, 2022
1 parent 8292ac1 commit 0b37559
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,17 @@ jobs:
gzip ./manpage/btm.1
- name: Build Debian release
uses: actions-rs/cargo@v1
with:
command: deb
args: --no-build --no-strip
use-cross: ${{ matrix.triple.cross }}
env:
RUST_BACKTRACE: 1
BTM_GENERATE_COMPLETIONS: true

- name: Copy Debian release
run: |
cargo install cargo-deb --version 1.37.0 --locked
cargo deb --no-build --no-strip
cp ./target/debian/bottom_*.deb ./bottom_${{ env.RELEASE_VERSION }}_${{ matrix.triple.name }}.deb
- name: Test Debian release
Expand Down
6 changes: 6 additions & 0 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
[build.env]
passthrough = ["RUST_BACKTRACE", "BTM_GENERATE_COMPLETIONS"]

[target.arm-unknown-linux-gnueabihf]
image = "clementtsang/cross:arm-unknown-linux-gnueabihf"

[target.aarch64-unknown-linux-gnu]
image = "clementtsang/cross:aarch64-unknown-linux-gnu"
3 changes: 3 additions & 0 deletions deployment/cargo_deb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

cargo install cargo-deb --version 1.37.0 --locked
4 changes: 4 additions & 0 deletions deployment/docker/aarch64-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM rustembedded/cross:aarch64-unknown-linux-gnu

COPY stage/cargo_deb.sh /
RUN /cargo_deb.sh
5 changes: 5 additions & 0 deletions deployment/docker/aarch64-unknown-linux-gnu/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

mkdir -p stage
cp ../../cargo_deb.sh ./stage/
docker build -t clementtsang/cross:arm-unknown-linux-gnueabihf .
4 changes: 4 additions & 0 deletions deployment/docker/arm-unknown-linux-gnueabihf/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM rustembedded/cross:arm-unknown-linux-gnueabihf

COPY stage/cargo_deb.sh /
RUN /cargo_deb.sh
5 changes: 5 additions & 0 deletions deployment/docker/arm-unknown-linux-gnueabihf/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

mkdir -p stage
cp ../../cargo_deb.sh ./stage/
docker build -t clementtsang/cross:arm-unknown-linux-gnueabihf .

0 comments on commit 0b37559

Please sign in to comment.