-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Use cargo-binstall for cargo-make and cargo-vita - Added workflow_dispatch to action - Added a parameter to override rust toolchain
- Loading branch information
Showing
2 changed files
with
13 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,15 @@ | ||
FROM vitasdk/vitasdk | ||
|
||
ARG CARGO_MAKE_VERSION=0.37.0 | ||
|
||
ENV RUSTUP_HOME=/usr/local/rustup \ | ||
CARGO_HOME=/usr/local/cargo \ | ||
PATH=/usr/local/cargo/bin:$PATH | ||
|
||
# Install rust nightly with all the components required to build std | ||
# build-base (mainly cc and ld) is required to build std. | ||
RUN apk add --no-cache rustup build-base jq perl clang llvm && \ | ||
rustup-init -y --default-toolchain nightly -c rustfmt -c rustc-dev -c rust-src | ||
RUN apk add --no-cache rustup build-base jq perl clang llvm | ||
|
||
RUN curl https://api.github.com/repos/vita-rust/cargo-vita/releases/latest | \ | ||
jq -r '.assets[] | select(.name|contains("x86_64-unknown-linux-musl.tar.gz")) | .browser_download_url' | \ | ||
xargs -n1 curl -LsSf -o /tmp/cargo-vita.tar.gz && \ | ||
tar -zxvf /tmp/cargo-vita.tar.gz -C /tmp && \ | ||
mv /tmp/cargo-vita-*linux-musl/cargo-vita "${CARGO_HOME}/bin" && \ | ||
rm -rf /tmp/cargo-vita* | ||
ARG RUST_TOOLCHAIN=nightly | ||
RUN rustup-init -y --default-toolchain ${RUST_TOOLCHAIN} -c rust-src | ||
|
||
# Install cargo make. Use a pre-build binary instead of compiling it | ||
RUN curl -LsSf -o /tmp/cargo-make.zip https://github.com/sagiegurari/cargo-make/releases/download/${CARGO_MAKE_VERSION}/cargo-make-v${CARGO_MAKE_VERSION}-x86_64-unknown-linux-musl.zip && \ | ||
unzip -j /tmp/cargo-make.zip -d /tmp/cargo-make && \ | ||
mv /tmp/cargo-make/cargo-make "${CARGO_HOME}/bin" && \ | ||
rm -rf /tmp/cargo-make* | ||
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | ash && \ | ||
cargo binstall --no-confirm --no-symlinks cargo-make cargo-vita |