Skip to content

Commit feacde2

Browse files
committed
Merge branch 'v1.5-dev'
2 parents ebe01a0 + 8aa624e commit feacde2

File tree

930 files changed

+31216
-13371
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

930 files changed

+31216
-13371
lines changed

.devcontainer/Dockerfile

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Use the official VS Code base image for dev containers
2+
FROM mcr.microsoft.com/devcontainers/base:ubuntu
3+
4+
# Install dependencies
5+
RUN apt-get update && apt-get install -y \
6+
build-essential \
7+
libssl-dev \
8+
pkg-config \
9+
clang \
10+
cmake \
11+
llvm \
12+
curl \
13+
gnupg \
14+
lsb-release \
15+
software-properties-common \
16+
unzip
17+
18+
# Switch to clang
19+
RUN rm /usr/bin/cc && ln -s /usr/bin/clang /usr/bin/cc
20+
21+
# Install protoc - protobuf compiler
22+
# The one shipped with Alpine does not work
23+
ARG TARGETARCH
24+
ARG PROTOC_VERSION=27.3
25+
RUN if [[ "$TARGETARCH" == "arm64" ]] ; then export PROTOC_ARCH=aarch_64; else export PROTOC_ARCH=x86_64; fi; \
26+
curl -Ls https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-${PROTOC_ARCH}.zip \
27+
-o /tmp/protoc.zip && \
28+
unzip -qd /opt/protoc /tmp/protoc.zip && \
29+
rm /tmp/protoc.zip && \
30+
ln -s /opt/protoc/bin/protoc /usr/bin/
31+
32+
# Install protoc
33+
RUN curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip \
34+
&& unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /usr/local \
35+
&& rm protoc-${PROTOC_VERSION}-linux-x86_64.zip
36+
37+
# Switch to vscode user
38+
USER vscode
39+
40+
ENV CARGO_HOME=/home/vscode/.cargo
41+
ENV PATH=$CARGO_HOME/bin:$PATH
42+
43+
# TODO: It doesn't sharing PATH between stages, so we need "source $HOME/.cargo/env" everywhere
44+
COPY rust-toolchain.toml .
45+
RUN TOOLCHAIN_VERSION="$(grep channel rust-toolchain.toml | awk '{print $3}' | tr -d '"')" && \
46+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
47+
--profile minimal \
48+
-y \
49+
--default-toolchain "${TOOLCHAIN_VERSION}" \
50+
--target wasm32-unknown-unknown
51+
52+
# Install wasm-bindgen-cli in the same profile as other components, to sacrifice some performance & disk space to gain
53+
# better build caching
54+
RUN if [[ -z "${SCCACHE_MEMCACHED}" ]] ; then unset SCCACHE_MEMCACHED ; fi ; \
55+
RUSTFLAGS="-C target-feature=-crt-static" \
56+
# Meanwhile if you want to update wasm-bindgen you also need to update version in:
57+
# - packages/wasm-dpp/Cargo.toml
58+
# - packages/wasm-dpp/scripts/build-wasm.sh
59+
cargo install [email protected] --locked
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"name": "Dash Platform Dev Container",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"context": ".."
6+
},
7+
"customizations": {
8+
"vscode": {
9+
"settings": {},
10+
"extensions": [
11+
"arcanis.vscode-zipfs",
12+
"chrmarti.regex",
13+
"davidanson.vscode-markdownlint",
14+
"ms-vscode.cmake-tools",
15+
"dbaeumer.vscode-eslint",
16+
"esbenp.prettier-vscode",
17+
"vadimcn.vscode-lldb",
18+
"rust-lang.rust-analyzer",
19+
"tamasfe.even-better-toml",
20+
"zhangyue.rust-mod-generator",
21+
"ms-azuretools.vscode-docker"
22+
]
23+
}
24+
},
25+
"remoteUser": "vscode",
26+
"mounts": [
27+
{
28+
"source": "devcontainer-platform-cargo-registry-index-${devcontainerId}",
29+
"target": "/home/vscode/.cargo/registry",
30+
"type": "volume"
31+
},
32+
{
33+
"source": "devcontainer-platform-cargo-registry-cache-${devcontainerId}",
34+
"target": "/home/vscode/.cargo/registry/cache",
35+
"type": "volume"
36+
},
37+
{
38+
"source": "devcontainer-platform-cargo-git-db-${devcontainerId}",
39+
"target": "/home/vscode/.cargo/git/db",
40+
"type": "volume"
41+
},
42+
{
43+
"source": "devcontainer-platform-target-${devcontainerId}",
44+
"target": "${containerWorkspaceFolder}/target",
45+
"type": "volume"
46+
}
47+
],
48+
"features": {
49+
"ghcr.io/devcontainers/features/common-utils:2": {
50+
"installZsh": "true",
51+
"username": "vscode",
52+
"userUid": "1000",
53+
"userGid": "1000",
54+
"upgradePackages": "true"
55+
},
56+
"ghcr.io/devcontainers/features/git:1": {
57+
"version": "latest",
58+
"ppa": "false"
59+
},
60+
"ghcr.io/devcontainers/features/github-cli:1": {},
61+
"ghcr.io/devcontainers/features/node:1": {
62+
"version": 20,
63+
"installYarnUsingApt": false
64+
},
65+
"ghcr.io/eitsupi/devcontainer-features/jq-likes:2": {},
66+
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
67+
"ghcr.io/schlich/devcontainer-features/starship:0": {},
68+
},
69+
"postCreateCommand": {
70+
"git-safe": "git config --global --add safe.directory ${containerWorkspaceFolder}",
71+
"cargo-permissions": "sudo chown -R vscode:vscode /home/vscode/.cargo ${containerWorkspaceFolder}/target"
72+
}
73+
}

.devcontainer/devcontainer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "Dash Platform Dev Container",
3+
"image": "ghcr.io/dashpay/platform/devcontainer:0.1.0"
4+
}

.github/actions/rust/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ runs:
7979
shell: bash
8080
run: |
8181
curl -Lo /tmp/protoc.zip \
82-
"https://github.com/protocolbuffers/protobuf/releases/download/v25.2/protoc-25.2-linux-${{ steps.protoc_arch.outputs.arch }}.zip"
82+
"https://github.com/protocolbuffers/protobuf/releases/download/v27.3/protoc-27.3-linux-${{ steps.protoc_arch.outputs.arch }}.zip"
8383
unzip -o /tmp/protoc.zip -d ${HOME}/.local
8484
echo "PROTOC=${HOME}/.local/bin/protoc" >> $GITHUB_ENV
8585
export PATH="${PATH}:${HOME}/.local/bin"
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Prebuild Dev Containers
2+
3+
on:
4+
push:
5+
paths:
6+
- '.devcontainer/**'
7+
- '.github/workflows/prebuild-devcontainers.yml'
8+
- rust-toolchain.toml
9+
- Dockerfile
10+
workflow_dispatch:
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
build:
18+
name: Build and push devcontainer
19+
runs-on: ["self-hosted", "linux", "x64", "ubuntu-platform"]
20+
timeout-minutes: 60
21+
steps:
22+
- name: Checkout repo
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node.JS
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: "20"
29+
30+
- name: Install skopeo
31+
run: |
32+
sudo apt-get update
33+
sudo apt-get install -y skopeo
34+
35+
- name: Set up QEMU
36+
uses: docker/setup-qemu-action@v3
37+
38+
- name: Setup Docker buildx
39+
uses: docker/setup-buildx-action@v3
40+
with:
41+
use: true
42+
43+
- name: Login to GitHub Container Registry
44+
uses: docker/login-action@v2
45+
with:
46+
registry: ghcr.io
47+
username: dashpay
48+
password: ${{ secrets.GHCR_TOKEN }}
49+
50+
- name: Build and push Platform devcontainer
51+
uses: devcontainers/[email protected]
52+
with:
53+
imageName: ghcr.io/dashpay/platform/devcontainer
54+
imageTag: 0.1.0
55+
platform: linux/amd64,linux/arm64
56+
configFile: .devcontainer/devcontainer-build.json
57+
push: always
58+
cacheFrom: ghcr.io/dashpay/platform/devcontainer

.github/workflows/release.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ jobs:
214214
- package_type: deb
215215
os: ubuntu-22.04
216216
- package_type: macos
217-
os: macos-12
217+
os: macos-14
218218
steps:
219219
- name: Check out repo
220220
uses: actions/checkout@v4
@@ -242,9 +242,11 @@ jobs:
242242
- name: Install macOS build deps
243243
if: runner.os == 'macOS'
244244
run: |
245-
brew install llvm docker colima coreutils
246-
colima start
247-
echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH
245+
brew install llvm coreutils
246+
247+
- name: Set up Docker for macOS
248+
if: runner.os == 'macOS'
249+
uses: docker-practice/actions-setup-docker@master
248250

249251
- name: Install the Apple certificate
250252
if: runner.os == 'macOS'
@@ -278,7 +280,7 @@ jobs:
278280

279281
- name: Create package
280282
env:
281-
OSX_KEYCHAIN: $RUNNER_TEMP/app-signing.keychain-db
283+
OSX_KEYCHAIN: ${{ runner.temp }}/app-signing.keychain-db
282284
run: "${GITHUB_WORKSPACE}/scripts/pack_dashmate.sh ${{ matrix.package_type }}"
283285

284286
- name: Upload artifacts to action summary

.pnp.cjs

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.
Binary file not shown.
-7.45 KB
Binary file not shown.

0 commit comments

Comments
 (0)