Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v1.6-dev' into build/prebuild-ro…
Browse files Browse the repository at this point in the history
…cksdb-docker
  • Loading branch information
lklimek committed Nov 13, 2024
2 parents 9ec5437 + 14bf85d commit a1156e0
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 23 deletions.
12 changes: 8 additions & 4 deletions .github/actions/local-network/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ runs:
shell: bash
run: echo "sha=$(git log -1 --format="%h" -- packages/dashmate)" >> $GITHUB_OUTPUT

- name: Set HOME variable to github context
shell: bash
run: echo "HOME=$HOME" >> $GITHUB_ENV

# TODO: Use upload artifacts action instead
- name: Restore local network data
id: local-network-data
Expand All @@ -36,7 +40,7 @@ runs:
bucket: multi-runner-cache-x1xibo9c
root: local-network-data
path: |
/home/ubuntu/.dashmate
${{ env.HOME }}/.dashmate
**/.env
dashmate_volumes_dump
key: local-network-volumes/${{ steps.dashmate-fingerprint.outputs.sha }}
Expand Down Expand Up @@ -73,7 +77,7 @@ runs:
bucket: multi-runner-cache-x1xibo9c
root: local-network-data
path: |
/home/ubuntu/.dashmate
${{ env.HOME }}/.dashmate
**/.env
dashmate_volumes_dump
key: local-network-volumes/${{ steps.dashmate-fingerprint.outputs.sha }}
Expand All @@ -90,9 +94,9 @@ runs:
docker tag ${{ inputs.image_org }}/dashmate-helper:$SHA_TAG dashpay/dashmate-helper:$VERSION
# Replace DAPI and Drive images with new org and tag in dashmate config
sed -i -E "s/dashpay\/(drive|dapi):[^\"]+/${{ inputs.image_org }}\/\1:${SHA_TAG}/g" /home/ubuntu/.dashmate/config.json
sed -i -E "s/dashpay\/(drive|dapi):[^\"]+/${{ inputs.image_org }}\/\1:${SHA_TAG}/g" ${{ env.HOME }}/.dashmate/config.json
cat /home/ubuntu/.dashmate/config.json
cat ${{ env.HOME }}/.dashmate/config.json
- name: Start local network
shell: bash
Expand Down
10 changes: 7 additions & 3 deletions .github/actions/rust/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,20 @@ runs:
shell: bash
run: echo "key=$(echo '${{ github.ref_name }}' | sha256sum | cut -d ' ' -f1)" >> $GITHUB_OUTPUT

- name: Set HOME variable to github context
shell: bash
run: echo "HOME=$HOME" >> $GITHUB_ENV

- name: Cache cargo registry (S3 bucket cache)
uses: strophy/actions-cache@opendal-update
if: inputs.cache == 'true'
with:
bucket: multi-runner-cache-x1xibo9c
root: actions-cache
path: |
/home/ubuntu/.cargo/registry/index
/home/ubuntu/.cargo/registry/cache
/home/ubuntu/.cargo/git
${{ env.HOME }}/.cargo/registry/index
${{ env.HOME }}/.cargo/registry/cache
${{ env.HOME }}/.cargo/git
key: ${{ runner.os }}/cargo/registry/${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}/cargo/registry/${{ hashFiles('**/Cargo.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prebuild-devcontainers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ concurrency:
jobs:
build:
name: Build and push devcontainer
runs-on: ["self-hosted", "linux", "x64", "ubuntu-platform"]
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- name: Checkout repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ concurrency:
jobs:
release-npm:
name: Release NPM packages
runs-on: ["self-hosted", "linux", "arm64", "ubuntu-platform"]
runs-on: ubuntu-24.04
timeout-minutes: 15
if: github.event_name != 'workflow_dispatch'
steps:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/tests-build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ on:
jobs:
build-image:
name: Build ${{ inputs.name }} image
# runs-on: ["self-hosted", "linux", "arm64", "ubuntu-platform"]
runs-on: ubuntu-24.04
steps:
- name: Check out repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-build-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
jobs:
build-js:
name: Build JS
runs-on: ["self-hosted", "linux", "arm64", "ubuntu-platform"]
runs-on: ubuntu-24.04
steps:
- name: Configure AWS credentials and bucket region
uses: aws-actions/configure-aws-credentials@v4
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/tests-dashmate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ on:
jobs:
dashmate-test:
name: Run ${{ inputs.name }} tests
# TODO: Try with Github Runner, probably it will be the same time
runs-on: [ "self-hosted", "linux", "arm64", "ubuntu-platform" ]
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- name: Check out repo
Expand All @@ -42,6 +41,7 @@ jobs:
- name: Setup Node.JS
uses: ./.github/actions/nodejs

# TODO: Use action artifacts
- name: Restore JS build artifacts
uses: strophy/actions-cache@opendal-update
with:
Expand Down Expand Up @@ -84,14 +84,18 @@ jobs:
run: echo "sha=$(git log -1 --format="%h" -- packages/dashmate)" >> $GITHUB_OUTPUT
if: inputs.restore_local_network_data == true

- name: Set HOME variable to github context
shell: bash
run: echo "HOME=$HOME" >> $GITHUB_ENV

- name: Use test suite local network data to speed up dashmate local network tests
id: local-network-data
uses: strophy/actions-cache/restore@opendal-update
with:
bucket: multi-runner-cache-x1xibo9c
root: local-network-data
path: |
/home/ubuntu/.dashmate
${{ env.HOME }}/.dashmate
dashmate_volumes_dump
key: local-network-volumes/${{ steps.dashmate-fingerprint.outputs.sha }}
if: inputs.restore_local_network_data == true
Expand All @@ -105,7 +109,7 @@ jobs:
env:
DEBUG: 1
DASHMATE_E2E_TESTS_SKIP_IMAGE_BUILD: true
DASHMATE_E2E_TESTS_LOCAL_HOMEDIR: /home/ubuntu/.dashmate
DASHMATE_E2E_TESTS_LOCAL_HOMEDIR: ${{ env.HOME }}/.dashmate
if: steps.local-network-data.outputs.cache-hit == 'true'

- name: Run tests without cache
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/tests-packges-functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ on:
jobs:
test-functional:
name: Run functional tests
runs-on: [ "self-hosted", "linux", "arm64", "ubuntu-platform" ]
runs-on: ubuntu-24.04
timeout-minutes: 15
env:
CHROME_BIN: /usr/bin/brave-browser
ECR_HOST: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com
steps:
- name: Check out repo
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/tests-test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ on:
jobs:
test-suite:
name: Run ${{ inputs.name }}
runs-on: [ "self-hosted", "linux", "arm64", "ubuntu-platform" ]
runs-on: ubuntu-24.04
timeout-minutes: 15
env:
CHROME_BIN: /usr/bin/brave-browser
ECR_HOST: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com
steps:
- name: Check out repo
Expand Down
4 changes: 0 additions & 4 deletions packages/dashmate/src/commands/status/masternode.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,13 @@ export default class MasternodeStatusCommand extends ConfigBaseCommand {
/**
* @param {Object} args
* @param {Object} flags
* @param {DockerCompose} dockerCompose
* @param {createRpcClient} createRpcClient
* @param {Config} config
* @param getMasternodeScope getMasternodeScope
* @return {Promise<void>}
*/
async runWithDependencies(
args,
flags,
dockerCompose,
createRpcClient,
config,
getMasternodeScope,
) {
Expand Down

0 comments on commit a1156e0

Please sign in to comment.