Skip to content

Commit

Permalink
build: Move installation of cargo2junit to builder (apache#70)
Browse files Browse the repository at this point in the history
* build: Move installation of cargo2junit to builder

Install nigthly and use that to install cargo2junit.  This avoids constant installations for each test run, as well as moving the details about the required toolchain for cargo2junit out of the build scripts.

* build: Switch to comet-builder

Originally the comet-builder would fail because of XML comments in one of the toml files.  This has been addressed.
  • Loading branch information
Steve Vaughan Jr committed Apr 30, 2024
1 parent f72ae86 commit 7a8b14b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
3 changes: 3 additions & 0 deletions dev/Dockerfile-stage1
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ ENV PATH="$JAVA_HOME/bin:${PATH}"
RUN cd /tmp && curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

# Install cargo2junit
RUN rustup install nightly && cargo +nightly install cargo2junit

# Use Rust toolchain, and seed Rust
COPY rust-toolchain /rust-toolchain
RUN cargo search
Expand Down
13 changes: 6 additions & 7 deletions rio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ builds:
branchName: main-apple
version: platform
machine: &rio3-machine
baseImage: docker.apple.com/pie/boson-builder:latest
baseImage: docker.apple.com/pie/comet-builder:latest
targetPlatforms:
- linux/amd64
- linux/arm64
Expand Down Expand Up @@ -64,7 +64,6 @@ builds:
# Running tests results in multiple testsuites if you use "--format junit" which results in
# an invalid XML file. These can be aggregated by Formatting the results as JSON and using
# cargo2junit to reformat the results as JUnit XML.
- cargo install cargo2junit
# TODO: enable all-features
- cargo test --release --color=never -- --color=never -Zunstable-options --report-time --format json | cargo2junit > target/cargo-reports/TEST-all.xml
reports: &reports
Expand Down Expand Up @@ -185,7 +184,7 @@ builds:
disabled: true
timeout: 180
machine: &rio2-machine
baseImage: docker.apple.com/pie/boson-builder:latest
baseImage: docker.apple.com/pie/comet-builder:latest
targetPlatforms:
- linux/amd64
# FIXME Disabld due to leveldbjni
Expand Down Expand Up @@ -324,7 +323,7 @@ builds:
machine:
<<: *rio3-machine
# NOTE: Requires ubi8 due to leveldbjni and graviton
baseImage: docker.apple.com/pie/boson-builder-ubi8:latest
baseImage: docker.apple.com/pie/comet-builder-ubi8:latest
env:
<<: *proxy_env
PROFILES: "-Pspark-3.3"
Expand All @@ -338,7 +337,7 @@ builds:
machine:
<<: *rio3-machine
# NOTE: Requires ubi8 due to leveldbjni and graviton
baseImage: docker.apple.com/pie/boson-builder-ubi8:latest
baseImage: docker.apple.com/pie/comet-builder-ubi8:latest
env:
<<: *proxy_env
PROFILES: "-Pspark-3.3,scala-2.13"
Expand All @@ -352,7 +351,7 @@ builds:
machine:
<<: *rio3-machine
# NOTE: Requires ubi8 due to leveldbjni and graviton
baseImage: docker.apple.com/pie/boson-builder-ubi8:latest
baseImage: docker.apple.com/pie/comet-builder-ubi8:latest
env:
<<: *proxy_env
PROFILES: "-Pspark-3.4"
Expand All @@ -372,7 +371,7 @@ builds:
machine:
<<: *rio3-machine
# NOTE: Requires ubi8 due to leveldbjni and graviton
baseImage: docker.apple.com/pie/boson-builder-ubi8:latest
baseImage: docker.apple.com/pie/comet-builder-ubi8:latest
env:
<<: *proxy_env
PROFILES: "-Pspark-3.4,scala-2.13"
Expand Down

0 comments on commit 7a8b14b

Please sign in to comment.