aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Rodrigues Lordello <[email protected]>2023-10-24 07:19:01 +0000
committerNicholas Rodrigues Lordello <[email protected]>2023-10-24 07:19:01 +0000
commitb8e72adfc487b430bf52c80c799073328af109a1 (patch)
tree3138f33e2c4e6fb6feca6c6bbabef04574323d48
parent1388ce8c4c2215ed029414d71833eab4b9bc8dc2 (diff)
Fix up development files
-rw-r--r--.devcontainer/Dockerfile5
-rw-r--r--.devcontainer/devcontainer.json31
-rw-r--r--.github/workflows/release.yml27
-rw-r--r--.github/workflows/rust.yml9
4 files changed, 16 insertions, 56 deletions
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index a2ce75f..70e0380 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -1,7 +1,6 @@
-ARG VARIANT="buster"
-FROM mcr.microsoft.com/vscode/devcontainers/rust:${VARIANT}
+FROM mcr.microsoft.com/devcontainers/rust:1-1-bookworm
RUN apt-get update &&\
- DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends binaryen fzf ripgrep tig &&\
+ DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends binaryen &&\
rustup target add wasm32-wasi &&\
curl https://wasmtime.dev/install.sh -sSf | bash
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 4adeca9..e162517 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -1,29 +1,6 @@
{
- "name": "Rust",
- "build": {
- "dockerfile": "Dockerfile",
- "args": {
- "VARIANT": "bookworm"
- }
- },
-
- "customizations": {
- "vscode": {
- "settings": {
- "files.watcherExclude": {
- "**/target/**": true
- },
- "rust-analyzer.checkOnSave.command": "clippy"
- },
-
- "extensions": [
- "rust-lang.rust-analyzer"
- ]
- }
- },
-
- "remoteUser": "vscode",
- "features": {
- "sshd": "latest"
- }
+ "name": "Rust",
+ "build": {
+ "dockerfile": "Dockerfile"
+ }
}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 2e5a117..914b9a8 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -9,34 +9,19 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Build
run: |
- rustup toolchain add nightly
- rustup +nightly target add wasm32-wasi
- cargo +nightly build --release --target wasm32-wasi
+ rustup target add wasm32-wasi
+ cargo build --release --target wasm32-wasi
- name: Optimize
run: |
sudo apt-get update && sudo apt-get install binaryen
wasm-opt target/wasm32-wasi/release/hdwallet.wasm -O4 -o target/wasm32-wasi/release/hdwallet.opt.wasm --strip-debug --strip-producers
- name: Release
- id: create_release
- uses: actions/create-release@v1
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- tag_name: ${{ github.ref }}
- release_name: Release ${{ github.ref }}
- draft: false
- prerelease: false
- - name: Upload Release Asset
- uses: actions/upload-release-asset@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: target/wasm32-wasi/release/hdwallet.opt.wasm
- asset_name: hdwallet.wasm
- asset_content_type: application/wasm
+ GH_TOKEN: ${{ github.token }}
+ run: |
+ gh release create ${GITHUB_REF#refs/*/} -t ${GITHUB_REF#refs/*/} --generate-notes 'target/wasm32-wasi/release/hdwallet.opt.wasm#hdwallet.wasm'
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 888e3d0..2ad8a78 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -13,7 +13,7 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Lint
run: |
cargo fmt -- --check
@@ -25,9 +25,8 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Build
run: |
- rustup toolchain add nightly
- rustup +nightly target add wasm32-wasi
- cargo +nightly build --target wasm32-wasi
+ rustup target add wasm32-wasi
+ cargo build --target wasm32-wasi