File tree Expand file tree Collapse file tree 6 files changed +20
-11
lines changed
Expand file tree Collapse file tree 6 files changed +20
-11
lines changed Original file line number Diff line number Diff line change 2020 image : joseluisq/rust-linux-darwin-builder:latest
2121 pull : if-not-exists
2222 commands :
23- - ./docker/image_test.sh
23+ - make test
2424
2525trigger :
2626 event :
Original file line number Diff line number Diff line change 77 - linux
88
99script :
10- - bash ./docker/image_test.sh
10+ - make test
1111
1212notifications :
13- email :
14- on_success : never
15- on_failure : always
13+ email : false
Original file line number Diff line number Diff line change 11build :
22 docker build \
3- -t joseluisq/rust-linux-darwin-builder:1 \
3+ -t joseluisq/rust-linux-darwin-builder:latest \
44 -f docker/Dockerfile .
55.PHONY : build
66
7+ test :
8+ @sudo chown -R rust:rust ./
9+ @echo " Testing application..."
10+ @rustc -vV
11+ @echo " Compiling application(linux-musl x86_64)..."
12+ @cargo build --manifest-path=examples/hello-world/Cargo.toml --release --target x86_64-unknown-linux-musl
13+ @du -sh examples/hello-world/target/x86_64-unknown-linux-musl/release/helloworld
14+ @echo
15+ @echo " Compiling application(apple-darwin x86_64)..."
16+ @cargo build --manifest-path=examples/hello-world/Cargo.toml --release --target x86_64-apple-darwin
17+ @du -sh examples/hello-world/target/x86_64-apple-darwin/release/helloworld
18+ .ONESHELL : test
19+
720release :
821 # 2. Update docker files to latest tag
922 ./docker/version.sh $(TAG )
Original file line number Diff line number Diff line change @@ -171,8 +171,7 @@ RUN set -eux \
171171 && curl -L -o ./tarballs/MacOSX${OSXCROSS_SDK_VERSION}.sdk.tar.xz \
172172 https://s3.amazonaws.com/andrew-osx-sdks/MacOSX${OSXCROSS_SDK_VERSION}.sdk.tar.xz \
173173 && env UNATTENDED=yes OSX_VERSION_MIN=10.7 ./build.sh \
174- && ./cleanup.sh \
175- && rm -rf ./taballs \
174+ && rm -rf *~ taballs *.tar.xz \
176175 && rm -rf /tmp/*
177176
178177ENV PATH $PATH:/home/rust/osxcross/target/bin
Original file line number Diff line number Diff line change 44set -euo pipefail
55
66# Make sure we can build our main container.
7- docker build -t joseluisq/rust-linux-darwin-builder .
7+ docker build -t joseluisq/rust-linux-darwin-builder -f docker/Dockerfile .
88
99# Make sure we can build our example derived container.
1010docker build -t rust-musl-zlib examples/adding-a-library
Original file line number Diff line number Diff line change @@ -171,8 +171,7 @@ RUN set -eux \
171171 && curl -L -o ./tarballs/MacOSX${OSXCROSS_SDK_VERSION}.sdk.tar.xz \
172172 https://s3.amazonaws.com/andrew-osx-sdks/MacOSX${OSXCROSS_SDK_VERSION}.sdk.tar.xz \
173173 && env UNATTENDED=yes OSX_VERSION_MIN=10.7 ./build.sh \
174- && ./cleanup.sh \
175- && rm -rf ./taballs \
174+ && rm -rf *~ taballs *.tar.xz \
176175 && rm -rf /tmp/*
177176
178177ENV PATH $PATH:/home/rust/osxcross/target/bin
You can’t perform that action at this time.
0 commit comments