Skip to content

Commit 9fa12f7

Browse files
Merge pull request #16 from multiversx/update-2024-11-11
Update mxpy, rust, sc-meta, wasm-opt, etc.
2 parents ac7b78e + 2537e0e commit 9fa12f7

File tree

6 files changed

+18
-21
lines changed

6 files changed

+18
-21
lines changed

.github/workflows/publish-image-rust.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,27 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Check out the repo
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v4
1818

1919
- name: Set environment variables
2020
run: |
2121
VERSION=v$(jq -r '.["version"]' ./src/smart-contracts-rust/devcontainer-template.json)
2222
echo "VERSION=$VERSION" >> $GITHUB_ENV
2323
2424
- name: Set up QEMU
25-
uses: docker/setup-qemu-action@v2
25+
uses: docker/setup-qemu-action@v3
2626

2727
- name: Set up Docker Buildx
28-
uses: docker/setup-buildx-action@v2
28+
uses: docker/setup-buildx-action@v3
2929

3030
- name: Log in to Docker Hub
31-
uses: docker/login-action@v2
31+
uses: docker/login-action@v3
3232
with:
3333
username: ${{ secrets.DOCKER_USERNAME }}
3434
password: ${{ secrets.DOCKER_PASSWORD }}
3535

3636
- name: Build and push
37-
uses: docker/build-push-action@v4
37+
uses: docker/build-push-action@v6
3838
with:
3939
context: ./resources/smart-contracts-rust
4040
push: true
@@ -43,7 +43,7 @@ jobs:
4343
tags: multiversx/devcontainer-smart-contracts-rust:${{ env.VERSION }}
4444

4545
- name: Push to "latest"
46-
uses: docker/build-push-action@v4
46+
uses: docker/build-push-action@v6
4747
with:
4848
context: ./resources/smart-contracts-rust
4949
push: ${{ inputs.latest }}

.github/workflows/publish-templates.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
publish:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121

2222
- name: "Publish"
23-
uses: devcontainers/action@v1.3.0
23+
uses: devcontainers/action@v1.4.3
2424
with:
2525
disable-repo-tagging: false
2626
publish-templates: true

.github/workflows/update-documentation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
generate:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v4
1313

1414
- name: Generate Documentation
15-
uses: devcontainers/action@v1
15+
uses: devcontainers/action@v1.4.3
1616
with:
1717
generate-docs: "true"
1818
base-path-to-templates: "./src"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ ${RUN} ${IMAGE} mxpy --version
3838
${RUN} ${IMAGE} cargo --version
3939
${RUN} ${IMAGE} rustc --version
4040
${RUN} ${IMAGE} sc-meta --version
41+
${RUN} ${IMAGE} wasm-opt --version
4142
```
4243

4344
Clone `mx-contracts-rs` locally, then build a few contracts within the container:

resources/smart-contracts-rust/Dockerfile

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ ARG USERNAME=developer
44
ARG USER_UID=1000
55
ARG USER_GID=$USER_UID
66

7-
ARG VERSION_MXPY="v9.4.1"
8-
ARG VERSION_RUST="nightly-2023-12-11"
9-
ARG VERSION_SC_META="0.47.1"
10-
ARG VERSION_WASM_OPT="0.112.0"
11-
ARG VERSION_VMTOOLS="v1.5.24"
7+
ARG VERSION_MXPY="v9.8.1"
8+
ARG VERSION_RUST="1.82.0"
9+
ARG VERSION_SC_META="0.54.0"
10+
ARG VERSION_WASM_OPT="0.116.1"
1211

1312
# Create the user
1413
RUN groupadd --gid $USER_GID $USERNAME \
@@ -37,7 +36,6 @@ WORKDIR /home/${USERNAME}
3736
ENV MULTIVERSX="/home/${USERNAME}/multiversx-sdk"
3837
ENV PATH="/home/${USERNAME}/.local/bin:${PATH}"
3938
ENV PATH="/home/${USERNAME}/.cargo/bin:${PATH}"
40-
ENV PATH="${MULTIVERSX}/vmtools:${PATH}"
4139

4240
# Install pipx
4341
RUN python3 -m pip install --no-cache-dir --user pipx
@@ -47,11 +45,9 @@ RUN pipx install multiversx-sdk-cli==${VERSION_MXPY}
4745

4846
# Install rust and other tools
4947
RUN mxpy config set "dependencies.rust.tag" ${VERSION_RUST} && \
50-
mxpy config set "dependencies.sc-meta.tag" ${VERSION_SC_META} && \
51-
mxpy config set "dependencies.wasm-opt.tag" ${VERSION_WASM_OPT} && \
52-
mxpy config set "dependencies.vmtools.tag" ${VERSION_VMTOOLS}
48+
mxpy config set "dependencies.sc-meta.tag" ${VERSION_SC_META}
5349
RUN mxpy deps install rust && rm -rf /home/${USERNAME}/.cargo/registry/* && rm -rf /home/${USERNAME}/.cargo/git/*
54-
RUN mxpy deps install vmtools && rm ${MULTIVERSX}/*.tar.gz && sudo rm -rf ${MULTIVERSX}/golang
50+
RUN cargo install wasm-opt --version ${VERSION_WASM_OPT}
5551

5652
# Install test wallets
5753
RUN mxpy deps install testwallets && rm ${MULTIVERSX}/*.tar.gz

src/smart-contracts-rust/devcontainer-template.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "smart-contracts-rust",
3-
"version": "0.2.0",
3+
"version": "0.3.0",
44
"name": "MultiversX: Smart Contracts Development (Rust)",
55
"description": "Develop smart contracts for MultiversX. Includes Rust, mxpy, VSCode extensions etc.",
66
"documentationURL": "https://github.com/multiversx/mx-template-devcontainers/blob/main/src/smart-contracts-rust",

0 commit comments

Comments
 (0)