diff --git a/.github/actions/local-network/action.yaml b/.github/actions/local-network/action.yaml index 3c6c468117..42b1672366 100644 --- a/.github/actions/local-network/action.yaml +++ b/.github/actions/local-network/action.yaml @@ -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 @@ -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 }} @@ -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 }} @@ -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 diff --git a/.github/actions/rust/action.yaml b/.github/actions/rust/action.yaml index 8854007013..c22923a221 100644 --- a/.github/actions/rust/action.yaml +++ b/.github/actions/rust/action.yaml @@ -95,6 +95,10 @@ 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' @@ -102,9 +106,9 @@ runs: 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') }} diff --git a/.github/workflows/prebuild-devcontainers.yml b/.github/workflows/prebuild-devcontainers.yml index 1825985c82..c7d4ee28f0 100644 --- a/.github/workflows/prebuild-devcontainers.yml +++ b/.github/workflows/prebuild-devcontainers.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4c43639d3a..7584b4f08b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: diff --git a/.github/workflows/tests-build-image.yml b/.github/workflows/tests-build-image.yml index f8b7c830f4..328a6ce2d4 100644 --- a/.github/workflows/tests-build-image.yml +++ b/.github/workflows/tests-build-image.yml @@ -17,7 +17,7 @@ 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 uses: actions/checkout@v4 @@ -41,7 +41,7 @@ jobs: image_name: ${{ inputs.image_name }} image_org: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com target: ${{ inputs.target }} - platform: linux/arm64 + platform: linux/amd64 push_tags: true dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/tests-build-js.yml b/.github/workflows/tests-build-js.yml index a367af55fc..bc67850ad9 100644 --- a/.github/workflows/tests-build-js.yml +++ b/.github/workflows/tests-build-js.yml @@ -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 diff --git a/.github/workflows/tests-dashmate.yml b/.github/workflows/tests-dashmate.yml index 369c72e06a..6e1b527aa0 100644 --- a/.github/workflows/tests-dashmate.yml +++ b/.github/workflows/tests-dashmate.yml @@ -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 @@ -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: @@ -84,6 +84,10 @@ 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 @@ -91,7 +95,7 @@ jobs: 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 @@ -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 diff --git a/.github/workflows/tests-packges-functional.yml b/.github/workflows/tests-packges-functional.yml index 57f735f0d5..39db41b53f 100644 --- a/.github/workflows/tests-packges-functional.yml +++ b/.github/workflows/tests-packges-functional.yml @@ -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 diff --git a/.github/workflows/tests-test-suite.yml b/.github/workflows/tests-test-suite.yml index f1d0ac1621..e9107b5e60 100644 --- a/.github/workflows/tests-test-suite.yml +++ b/.github/workflows/tests-test-suite.yml @@ -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 diff --git a/Dockerfile b/Dockerfile index 5039a062b6..23766e2f7d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -232,7 +232,7 @@ RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOM else \ export FEATURES_FLAG="--features=console,grovedbg" ; \ export OUT_DIRECTORY=debug ; \ - + fi && \ if [[ -z "${SCCACHE_MEMCACHED}" ]] ; then unset SCCACHE_MEMCACHED ; fi ; \ cargo build \ diff --git a/packages/dashmate/src/commands/status/masternode.js b/packages/dashmate/src/commands/status/masternode.js index cbc34cd4ca..df4ce999f5 100644 --- a/packages/dashmate/src/commands/status/masternode.js +++ b/packages/dashmate/src/commands/status/masternode.js @@ -22,8 +22,6 @@ 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} @@ -31,8 +29,6 @@ export default class MasternodeStatusCommand extends ConfigBaseCommand { async runWithDependencies( args, flags, - dockerCompose, - createRpcClient, config, getMasternodeScope, ) {