File tree 5 files changed +39
-2
lines changed
5 files changed +39
-2
lines changed Original file line number Diff line number Diff line change @@ -204,6 +204,7 @@ jobs:
204
204
- { target: thumbv7em-none-eabi, os: ubuntu-latest, std: 1 }
205
205
- { target: thumbv7em-none-eabihf, os: ubuntu-latest, std: 1 }
206
206
- { target: thumbv7m-none-eabi, os: ubuntu-latest, std: 1 }
207
+ - { target: cross, os: ubuntu-latest }
207
208
208
209
build :
209
210
name : target (${{ matrix.pretty }},${{ matrix.os }})
@@ -261,7 +262,7 @@ jobs:
261
262
LATEST : ${{ needs.check.outputs.is-latest || 'false' }}
262
263
shell : bash
263
264
- name : Set Docker image for test
264
- if : steps.prepare-meta.outputs.has-image
265
+ if : steps.prepare-meta.outputs.has-image && ${{ matrix.target != 'cross' }}
265
266
run : |
266
267
TARGET_VAR="cross_target_${TARGET//-/_}_image"
267
268
echo "${TARGET_VAR^^}=${IMAGE}" | tee -a "${GITHUB_ENV}"
@@ -270,7 +271,7 @@ jobs:
270
271
IMAGE : ${{ steps.build-docker-image.outputs.image }}
271
272
shell : bash
272
273
- name : Test Image
273
- if : steps.prepare-meta.outputs.has-image && (github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/trying')
274
+ if : ( steps.prepare-meta.outputs.has-image && (github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/trying')) && ${{ matrix.target != 'cross' }}
274
275
run : ./ci/test.sh
275
276
env :
276
277
TARGET : ${{ matrix.target }}
Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
7
7
8
8
## [ Unreleased] - ReleaseDate
9
9
10
+ ### Added
11
+
12
+ - #878 - added a dockerfile containing cross.
13
+
10
14
### Changed
11
15
12
16
- #869 - ensure cargo configuration environment variable flags are passed to the docker container.
Original file line number Diff line number Diff line change
1
+ FROM docker:20.10-dind
2
+
3
+ RUN apk add curl bash libgcc gcc musl-dev git
4
+
5
+ RUN curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
6
+ # need to ensure cargo is in the path when we run this command,
7
+ # since we won't be sourcing the profile.
8
+ RUN PATH="$HOME/.cargo/bin:$PATH" cargo install cross --git https://github.com/cross-rs/cross --locked
9
+
10
+ COPY cross-entry.sh /
11
+ ENTRYPOINT ["/cross-entry.sh"]
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # shellcheck disable=SC1090
4
+ . ~ /.cargo/env
5
+ export CROSS_CONTAINER_IN_CONTAINER=1
6
+
7
+ exec " ${@ } "
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ main () {
4
+ apk add gcc curl musl-dev
5
+
6
+ curl --proto " =https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
7
+ PATH=" $HOME /.cargo/bin:$PATH " cargo install cross --git https://github.com/cross-rs/cross --locked
8
+
9
+ apk del gcc curl musl-dev
10
+
11
+ rm -rf " ${0} "
12
+ }
13
+
14
+ main " ${@ } "
You can’t perform that action at this time.
0 commit comments