diff --git a/.github/scripts/generate-release-body.ts b/.github/scripts/generate-release-body.ts index 6bab42c93..884a1c0c4 100644 --- a/.github/scripts/generate-release-body.ts +++ b/.github/scripts/generate-release-body.ts @@ -236,25 +236,30 @@ async function main() { from: { type: "string", describe: "previous tag to retrieve commits from", - required: true, + requiresArg: true, }, to: { type: "string", describe: "current tag being drafted", - required: true, + requiresArg: true, }, owner: { type: "string", describe: "Repository owner (Ex: AstarNetwork)", - required: true, + requiresArg: true, }, repo: { type: "string", describe: "Repository name (Ex: Astar)", - required: true, + requiresArg: true, }, + type: { + type: "string", + describe: "Type of release - runtime or client", + choices: ["runtime", "client"], + requiresArg: true, + } }) - .demandOption(["from", "to"]) .help().argv; const octokit = new Octokit({ @@ -264,10 +269,6 @@ async function main() { const previousTag = argv.from; const newTag = argv.to; - const runtimes = ["shibuya", "shiden", "astar"].map((runtimeName) => - getRuntimeInfo(argv["srtool-report-folder"], runtimeName) - ); - const moduleLinks = ["polkadot-sdk", "frontier"].map((repoName) => ({ name: repoName, link: getCompareLink(repoName, previousTag, newTag), @@ -297,7 +298,8 @@ async function main() { } }; - const template = ` + if (argv.type === "client") { + const template = ` ## Description (Placeholder for release descriptions, please freely write explanations for this release here.) @@ -308,6 +310,43 @@ async function main() { > MEDIUM - some minor changes to the client > LOW - no client changes +## Changes +### Client +${clientPRs.length > 0 ? ` +${clientPRs.map((pr) => `* ${printPr(pr)}`).join("\n")} +` : "None"} +### Runtime (impacts built-in runtimes) +${runtimePRs.length > 0 ? ` +${runtimePRs.map((pr) => `* ${printPr(pr)}`).join("\n")} +` : "None"} +### Others +${remainingPRs.length > 0 ? ` +${remainingPRs.map((pr) => `* ${printPr(pr)}`).join("\n")} +` : "None"} + +## Dependency Changes +Astar: https://github.com/${argv.owner}/${argv.repo}/compare/${previousTag}...${newTag} +${moduleLinks.map((modules) => `${capitalize(modules.name)}: ${modules.link}`).join("\n")} + +## Download Links +| Arch | Link | +| ----------- | ------- | +| \`MacOS x86_64\` | [Download](https://github.com/AstarNetwork/Astar/releases/download/${newTag}/astar-collator-${newTag}-macOS-x86_64.tar.gz) | +| \`Ubuntu x86_64\` | [Download](https://github.com/AstarNetwork/Astar/releases/download/${newTag}/astar-collator-${newTag}-ubuntu-x86_64.tar.gz) | +| \`Ubuntu aarch64\` | [Download](https://github.com/AstarNetwork/Astar/releases/download/${newTag}/astar-collator-${newTag}-ubuntu-aarch64.tar.gz) | + +[](https://hub.docker.com/r/staketechnologies/astar-collator/tags) + ` + console.log(template); + } else if (argv.type === "runtime") { + const runtimes = ["shibuya", "shiden", "astar"].map((runtimeName) => + getRuntimeInfo(argv["srtool-report-folder"], runtimeName) + ); + + const template = ` +## Description +(Placeholder for release descriptions, please freely write explanations for this release here.) + ${runtimes.length > 0 ? `## Runtimes ${runtimes .map( @@ -319,7 +358,6 @@ ${runtimes 🎁 Metadata version: ${runtime.srtool.runtimes.compressed.subwasm.metadata_version} 🗳️ sha256: ${runtime.srtool.runtimes.compressed.sha256} 🗳️ blake2-256: ${runtime.srtool.runtimes.compressed.blake2_256} -🗳️ proposal (authorizeUpgrade): ${runtime.srtool.runtimes.compressed.subwasm.parachain_authorize_upgrade_hash} 📦 IPFS: ${runtime.srtool.runtimes.compressed.subwasm.ipfs_hash} \`\`\` `).join(`\n`)}` : ""} @@ -328,10 +366,6 @@ ${runtimes WASM runtime built using \`${runtimes[0]?.srtool.info.rustc}\` ## Changes -### Client -${clientPRs.length > 0 ? ` -${clientPRs.map((pr) => `* ${printPr(pr)}`).join("\n")} -` : "None"} ### Runtime ${runtimePRs.length > 0 ? ` ${runtimePRs.map((pr) => `* ${printPr(pr)}`).join("\n")} @@ -344,18 +378,11 @@ ${remainingPRs.map((pr) => `* ${printPr(pr)}`).join("\n")} ## Dependency Changes Astar: https://github.com/${argv.owner}/${argv.repo}/compare/${previousTag}...${newTag} ${moduleLinks.map((modules) => `${capitalize(modules.name)}: ${modules.link}`).join("\n")} - -## Download Links -| Arch | Link | -| ----------- | ------- | -| \`MacOS x86_64\` | [Download](https://github.com/AstarNetwork/Astar/releases/download/${newTag}/astar-collator-${newTag}-macOS-x86_64.tar.gz) | -| \`Ubuntu x86_64\` | [Download](https://github.com/AstarNetwork/Astar/releases/download/${newTag}/astar-collator-${newTag}-ubuntu-x86_64.tar.gz) | -| \`Ubuntu aarch64\` | [Download](https://github.com/AstarNetwork/Astar/releases/download/${newTag}/astar-collator-${newTag}-ubuntu-aarch64.tar.gz) | - -[](https://hub.docker.com/r/staketechnologies/astar-collator/tags) -` - - console.log(template); + ` + console.log(template); + } else { + console.log("Invalid type - should not happen."); + } } -main(); +main(); \ No newline at end of file diff --git a/.github/workflows/base_checks.yaml b/.github/workflows/base_checks.yaml index 38e2c5357..78d10d86e 100644 --- a/.github/workflows/base_checks.yaml +++ b/.github/workflows/base_checks.yaml @@ -5,6 +5,7 @@ on: - '**' tags-ignore: - v[0-9]+.[0-9]+.[0-9]+* + - runtime-[0-9]+* workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/release-client.yml b/.github/workflows/release-client.yml new file mode 100644 index 000000000..239761ae6 --- /dev/null +++ b/.github/workflows/release-client.yml @@ -0,0 +1,324 @@ +name: Release Client Build +on: + push: + tags: + - v[0-9]+.[0-9]+.[0-9]+* + workflow_dispatch: +jobs: + checks-and-tests: + runs-on: [self-hosted, Linux, X64] + steps: + - name: Free disk space + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /usr/local/lib/android + sudo rm -rf /opt/ghc + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + df -h + + - name: Checkout the source code + uses: actions/checkout@v4 + with: + submodules: true + + - name: Install deps + run: sudo apt -y install protobuf-compiler + + - name: Install & display rust toolchain + run: rustup show + + - name: Check targets are installed correctly + run: rustup target list --installed + + - name: Install cargo-nextest + run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin + + - name: Check all features compilation + run: cargo check --features try-runtime,runtime-benchmarks --locked + + - name: Run all tests + run: make test-all + + native-linux: + needs: checks-and-tests + runs-on: [self-hosted, Linux, X64] + strategy: + matrix: + target: + - x86_64-unknown-linux-gnu + - aarch64-unknown-linux-gnu + + steps: + - name: Checkout the source code + uses: actions/checkout@v4 + with: + submodules: true + + - name: Install deps + run: sudo apt -y install protobuf-compiler lld + + - name: aarch64 setup + if: contains(matrix.target, 'aarch64') + shell: bash + run: | + sudo apt update + sudo apt install -y gcc-multilib g++-multilib + sudo apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu + + mkdir -p .cargo + touch .cargo/config + printf '[target.aarch64-unknown-linux-gnu]\nlinker = "aarch64-linux-gnu-gcc"' >> .cargo/config + + - name: x86_64 setup + if: contains(matrix.target, 'x86_64') + run: | + mkdir -p .cargo + touch .cargo/config + printf '[target.x86_64-unknown-linux-gnu]\nrustflags = ["-Clink-arg=-fuse-ld=lld"]' >> .cargo/config + + - name: Install & display rust toolchain + run: rustup show + + - name: Add aarch64 target + if: contains(matrix.target, 'aarch64') + run: rustup target add ${{ matrix.target }} + + - name: Check targets are installed correctly + run: rustup target list --installed + + - name: Build optimized binary + run: cargo build --profile production --target ${{ matrix.target }} --locked --bin astar-collator + + - name: Set artifact name + env: + TARGET: ${{ matrix.target }} + id: artifact-name + run: echo "name=astar-ubuntu-latest-${TARGET%%-*}" >> $GITHUB_OUTPUT + + - uses: actions/upload-artifact@v3 + with: + name: ${{ steps.artifact-name.outputs.name }} + path: target/${{ matrix.target }}/production/astar-collator + + native-macos: + needs: checks-and-tests + runs-on: macos-latest + steps: + - name: Checkout the source code + uses: actions/checkout@v4 + with: + submodules: true + + - name: Install deps + run: brew install protobuf + + # Temporary dirty fix + # https://github.com/actions/runner-images/issues/10511 + - name: Disk Cleanup + run: | + xcrun simctl delete all || true + sudo rm -rf ~/Library/Developer/CoreSimulator/Caches/* || true + sudo rm -rf /Users/runner/Library/Android/sdk || true + sudo rm -rf /Applications/Xcode_14.3.1.app || true + sudo rm -rf /Applications/Xcode_15.0.1.app || true + sudo rm -rf /Applications/Xcode_15.1.app || true + sudo rm -rf /Applications/Xcode_15.2.app || true + sudo rm -rf /Applications/Xcode_15.3.app || true + df -h + + - name: Install & display rust toolchain + run: rustup show + + - name: Check targets are installed correctly + run: rustup target list --installed + + - name: Build optimized binary + run: cargo build --locked --profile production --bin astar-collator + + - uses: actions/upload-artifact@v3 + with: + name: astar-macOS-latest-x86_64 + path: target/production/astar-collator + + docker: + needs: native-linux + runs-on: ubuntu-latest + steps: + - name: Checkout the source code + uses: actions/checkout@v4 + with: + submodules: true + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Docker meta + id: docker_meta + uses: crazy-max/ghaction-docker-meta@v1 + with: + images: staketechnologies/astar-collator + tag-custom: shiden + tag-sha: true # add git short SHA as Docker tag + + - name: Download pre-built linux collator binary + uses: actions/download-artifact@v3 + with: + name: astar-ubuntu-latest-x86_64 + + - name: Make binary executable and copy it to docker folder + run: chmod +x astar-collator && cp astar-collator third-party/docker + + - name: Build & Push docker image + uses: docker/build-push-action@v2 + with: + context: third-party/docker + platforms: linux/amd64 + labels: ${{ steps.docker_meta.outputs.labels }} + tags: ${{ steps.docker_meta.outputs.tags }} + push: true + + publish-release-draft: + needs: [native-linux, native-macos, docker] + runs-on: ubuntu-latest + outputs: + release_url: ${{ steps.create-release.outputs.html_url }} + upload_url: ${{ steps.create-release.outputs.upload_url }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Use Node.js 20.x + uses: actions/setup-node@v2 + with: + node-version: 20.x + + - name: Get the latest client release + id: latest-release + # We're making an assumption that the latest client release will be within the last 30 releases + run: | + latest_client_tag=$(curl -s https://api.github.com/repos/AstarNetwork/Astar/releases | \ + jq -r 'map(select(.name | test("^v\\d+\\.\\d+\\.\\d+$"; "i")))[0] | .tag_name') + echo "latest_client_tag=$latest_client_tag" >> $GITHUB_OUTPUT + + - name: Generate Release Body + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + id: generate-release-body + run: | + cd .github/scripts + yarn + yarn -s run ts-node generate-release-body.ts generate \ + --owner "${{ github.repository_owner }}" \ + --repo "$(basename ${{ github.repository }})" \ + --from "${{ steps.latest-release.outputs.latest_client_tag }}" \ + --to "${{ github.ref_name }}" \ + --type client \ + > ../../body.md + + - name: Create Release Draft + id: create-release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref_name }} + release_name: ${{ github.ref_name }} + body_path: body.md + draft: true + + upload-binaries: + needs: publish-release-draft + runs-on: ubuntu-latest + strategy: + matrix: + os: ["ubuntu", "macOS"] + arch: ["x86_64", "aarch64"] + exclude: + - os: macOS + arch: aarch64 + steps: + - name: Create download folder + run: | + mkdir -p ${{ matrix.os }}-${{ matrix.arch }}-bin + + - name: Download pre-built collator binary + uses: actions/download-artifact@v3 + with: + name: astar-${{ matrix.os }}-latest-${{ matrix.arch }} + path: ${{ matrix.os }}-${{ matrix.arch }}-bin + + - name: Make binary executable and tar gzip + run: | + cd ${{ matrix.os }}-${{ matrix.arch }}-bin + chmod +x astar-collator + tar zcvf astar-collator.tar.gz astar-collator + + - name: Upload binary artifact + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.publish-release-draft.outputs.upload_url }} + asset_path: ${{ matrix.os }}-${{ matrix.arch }}-bin/astar-collator.tar.gz + asset_name: astar-collator-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }}.tar.gz + asset_content_type: application/gzip + + chain-sync-smoke: + needs: native-linux + runs-on: ubuntu-latest + strategy: + matrix: + chain: ["astar", "shiden", "shibuya"] + + steps: + - name: Checkout the source code + uses: actions/checkout@v4 + + - name: Download pre-built collator binary + uses: actions/download-artifact@v3 + with: + name: astar-ubuntu-latest-x86_64 + path: target/release + + - name: Sync chain ${{ matrix.chain }} + run: | + chmod +x target/release/astar-collator + ./scripts/sync-smoke.sh ${{ matrix.chain }} + + zombienet-smoke: + needs: native-linux + runs-on: ubuntu-latest + strategy: + matrix: + chain: ["astar-dev", "shiden-dev", "shibuya-dev"] + + steps: + - name: Checkout the source code + uses: actions/checkout@v4 + + - name: Download pre-built collator binary + uses: actions/download-artifact@v3 + with: + name: astar-ubuntu-latest-x86_64 + path: third-party/zombienet + + - name: Setup + run: chmod +x third-party/zombienet/astar-collator + + - name: Setup zombienet + working-directory: third-party/zombienet + run: ./setup.sh + + - name: ${{ matrix.chain }} build blocks + working-directory: third-party/zombienet + env: + CHAIN: ${{ matrix.chain }} + run: zombienet -p native test smoke.zndsl diff --git a/.github/workflows/release.yml b/.github/workflows/release-runtime.yml similarity index 59% rename from .github/workflows/release.yml rename to .github/workflows/release-runtime.yml index d4b8a9a0d..949351b8f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release-runtime.yml @@ -1,8 +1,8 @@ -name: Release Build +name: Release Runtime Build on: push: tags: - - v[0-9]+.[0-9]+.[0-9]+* + - runtime-[0-9]+* workflow_dispatch: env: SUBWASM_VERSION: 0.16.1 @@ -42,67 +42,6 @@ jobs: - name: Run all tests run: make test-all - native-linux: - needs: checks-and-tests - runs-on: [self-hosted, Linux, X64] - strategy: - matrix: - target: - - x86_64-unknown-linux-gnu - - aarch64-unknown-linux-gnu - - steps: - - name: Checkout the source code - uses: actions/checkout@v4 - with: - submodules: true - - - name: Install deps - run: sudo apt -y install protobuf-compiler lld - - - name: aarch64 setup - if: contains(matrix.target, 'aarch64') - shell: bash - run: | - sudo apt update - sudo apt install -y gcc-multilib g++-multilib - sudo apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu - - mkdir -p .cargo - touch .cargo/config - printf '[target.aarch64-unknown-linux-gnu]\nlinker = "aarch64-linux-gnu-gcc"' >> .cargo/config - - - name: x86_64 setup - if: contains(matrix.target, 'x86_64') - run: | - mkdir -p .cargo - touch .cargo/config - printf '[target.x86_64-unknown-linux-gnu]\nrustflags = ["-Clink-arg=-fuse-ld=lld"]' >> .cargo/config - - - name: Install & display rust toolchain - run: rustup show - - - name: Add aarch64 target - if: contains(matrix.target, 'aarch64') - run: rustup target add ${{ matrix.target }} - - - name: Check targets are installed correctly - run: rustup target list --installed - - - name: Build optimized binary - run: cargo build --profile production --target ${{ matrix.target }} --locked - - - name: Set artifact name - env: - TARGET: ${{ matrix.target }} - id: artifact-name - run: echo "::set-output name=name::astar-ubuntu-latest-${TARGET%%-*}" - - - uses: actions/upload-artifact@v3 - with: - name: ${{ steps.artifact-name.outputs.name }} - path: target/${{ matrix.target }}/production/astar-collator - evm-tracing-runtimes: needs: checks-and-tests runs-on: [self-hosted, Linux, X64] @@ -145,107 +84,6 @@ jobs: name: shibuya-evm-tracing-runtime path: target/production/wbuild/shibuya-runtime/shibuya_evm_tracing_runtime.compact.compressed.wasm - native-macos: - needs: checks-and-tests - runs-on: macos-latest - env: - RUSTC_WRAPPER: "sccache" - SCCACHE_BUCKET: ${{ secrets.SCCACHE_BUCKET }} - SCCACHE_REGION: ${{ secrets.SCCACHE_REGION }} - SCCACHE_S3_KEY_PREFIX: "astar-macos" - permissions: - id-token: write - contents: read - steps: - - name: Checkout the source code - uses: actions/checkout@v4 - with: - submodules: true - - - name: configure aws credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.SCCACHE_ROLE }} - role-session-name: github_astar_mac - aws-region: ${{ secrets.SCCACHE_REGION }} - - - name: Install deps - run: brew install protobuf sccache - - # Temporary dirty fix - # https://github.com/actions/runner-images/issues/10511 - - name: Disk Cleanup - run: | - xcrun simctl delete all || true - sudo rm -rf ~/Library/Developer/CoreSimulator/Caches/* || true - sudo rm -rf /Users/runner/Library/Android/sdk || true - sudo rm -rf /Applications/Xcode_14.3.1.app || true - sudo rm -rf /Applications/Xcode_15.0.1.app || true - sudo rm -rf /Applications/Xcode_15.1.app || true - sudo rm -rf /Applications/Xcode_15.2.app || true - sudo rm -rf /Applications/Xcode_15.3.app || true - df -h - - - name: Install & display rust toolchain - run: rustup show - - - name: Check targets are installed correctly - run: rustup target list --installed - - - name: Build optimized binary - run: cargo build --locked --profile production - - - name: Show sccache stats - run: sccache --show-stats - - - uses: actions/upload-artifact@v3 - with: - name: astar-macOS-latest-x86_64 - path: target/production/astar-collator - - docker: - needs: native-linux - runs-on: ubuntu-latest - steps: - - name: Checkout the source code - uses: actions/checkout@v4 - with: - submodules: true - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Docker meta - id: docker_meta - uses: crazy-max/ghaction-docker-meta@v1 - with: - images: staketechnologies/astar-collator - tag-custom: shiden - tag-sha: true # add git short SHA as Docker tag - - - name: Download pre-built linux collator binary - uses: actions/download-artifact@v3 - with: - name: astar-ubuntu-latest-x86_64 - - - name: Make binary executable and copy it to docker folder - run: chmod +x astar-collator && cp astar-collator third-party/docker - - - name: Build & Push docker image - uses: docker/build-push-action@v2 - with: - context: third-party/docker - platforms: linux/amd64 - labels: ${{ steps.docker_meta.outputs.labels }} - tags: ${{ steps.docker_meta.outputs.tags }} - push: true - srtool: needs: checks-and-tests runs-on: ubuntu-latest @@ -327,7 +165,7 @@ jobs: ${{ matrix.chain }}-diff.txt publish-release-draft: - needs: [native-linux, evm-tracing-runtimes, native-macOS, docker, srtool] + needs: [evm-tracing-runtimes, srtool] runs-on: ubuntu-latest outputs: release_url: ${{ steps.create-release.outputs.html_url }} @@ -355,17 +193,26 @@ jobs: name: shibuya-runtime path: runtime-artifacts - - name: Use Node.js 18.x + - name: Use Node.js 20.x uses: actions/setup-node@v2 with: - node-version: 18.x + node-version: 20.x - - name: Get the latest release + - name: Get the latest runtime release id: latest-release - uses: pozetroninc/github-action-get-latest-release@v0.5.0 - with: - repository: AstarNetwork/Astar - excludes: "prerelease, draft" + # We're making an assumption that the latest runtime release will be within the last 30 releases + run: | + releases=$(curl -s https://api.github.com/repos/AstarNetwork/Astar/releases) + + latest_runtime_tag=$(echo "$releases" | jq -r ' + [ + (.[] | select(.name | test("^runtime-\\d{4,}$"; "i")) | .tag_name), + (.[] | select(.name | test("^v\\d+\\.\\d+\\.\\d+$"; "i")) | .tag_name) + ] | first + ') + echo "latest_runtime_tag=$latest_runtime_tag" >> $GITHUB_OUTPUT + + echo "$latest_runtime_tag" - name: Generate Release Body env: @@ -374,7 +221,14 @@ jobs: run: | cd .github/scripts yarn - yarn -s run ts-node generate-release-body.ts generate --owner "${{ github.repository_owner }}" --repo "$(basename ${{ github.repository }})" --from "${{ steps.latest-release.outputs.release }}" --to "${{ github.ref_name }}" --srtool-report-folder '../../runtime-artifacts/' > ../../body.md + yarn -s run ts-node generate-release-body.ts generate \ + --owner "${{ github.repository_owner }}" \ + --repo "$(basename ${{ github.repository }})" \ + --from "${{ steps.latest-release.outputs.latest_runtime_tag }}" \ + --to "${{ github.ref_name }}" \ + --type runtime \ + --srtool-report-folder '../../runtime-artifacts/' \ + > ../../body.md - name: Create Release Draft id: create-release @@ -387,44 +241,6 @@ jobs: body_path: body.md draft: true - upload-binaries: - needs: publish-release-draft - runs-on: ubuntu-latest - strategy: - matrix: - os: ["ubuntu", "macOS"] - arch: ["x86_64", "aarch64"] - exclude: - - os: macOS - arch: aarch64 - steps: - - name: Create download folder - run: | - mkdir -p ${{ matrix.os }}-${{ matrix.arch }}-bin - mkdir -p ubuntu-tracing-bin - - - name: Download pre-built collator binary - uses: actions/download-artifact@v3 - with: - name: astar-${{ matrix.os }}-latest-${{ matrix.arch }} - path: ${{ matrix.os }}-${{ matrix.arch }}-bin - - - name: Make binary executable and tar gzip - run: | - cd ${{ matrix.os }}-${{ matrix.arch }}-bin - chmod +x astar-collator - tar zcvf astar-collator.tar.gz astar-collator - - - name: Upload binary artifact - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ needs.publish-release-draft.outputs.upload_url }} - asset_path: ${{ matrix.os }}-${{ matrix.arch }}-bin/astar-collator.tar.gz - asset_name: astar-collator-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.arch }}.tar.gz - asset_content_type: application/gzip - upload-runtimes: needs: publish-release-draft runs-on: ubuntu-latest @@ -534,55 +350,3 @@ jobs: asset_path: evm-tracing-artifacts.tar.gz asset_name: evm-tracing-artifacts-${{ github.ref_name }}.tar.gz asset_content_type: application/gzip - - chain-sync-smoke: - needs: native-linux - runs-on: ubuntu-latest - strategy: - matrix: - chain: ["astar", "shiden", "shibuya"] - - steps: - - name: Checkout the source code - uses: actions/checkout@v4 - - - name: Download pre-built collator binary - uses: actions/download-artifact@v3 - with: - name: astar-ubuntu-latest-x86_64 - path: target/release - - - name: Sync chain ${{ matrix.chain }} - run: | - chmod +x target/release/astar-collator - ./scripts/sync-smoke.sh ${{ matrix.chain }} - - zombienet-smoke: - needs: native-linux - runs-on: ubuntu-latest - strategy: - matrix: - chain: ["astar-dev", "shiden-dev", "shibuya-dev"] - - steps: - - name: Checkout the source code - uses: actions/checkout@v4 - - - name: Download pre-built collator binary - uses: actions/download-artifact@v3 - with: - name: astar-ubuntu-latest-x86_64 - path: third-party/zombienet - - - name: Setup - run: chmod +x third-party/zombienet/astar-collator - - - name: Setup zombienet - working-directory: third-party/zombienet - run: ./setup.sh - - - name: ${{ matrix.chain }} build blocks - working-directory: third-party/zombienet - env: - CHAIN: ${{ matrix.chain }} - run: zombienet -p native test smoke.zndsl diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 708c6d1ea..842734330 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -5,6 +5,7 @@ on: - '**' tags-ignore: - v[0-9]+.[0-9]+.[0-9]+* + - runtime-[0-9]+* workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/README.md b/README.md index a95a84d5c..b3a58e847 100644 --- a/README.md +++ b/README.md @@ -40,10 +40,10 @@ $ cd Astar # compile the node # note: you may encounter some errors if `wasm32-unknown-unknown` is not installed, or if the toolchain channel is outdated -$ cargo build --release +$ cargo build --profile production # show list of available commands -$ ./target/release/astar-collator --help +$ ./target/production/astar-collator --help ``` ### Building with Nix @@ -85,6 +85,22 @@ $ curl -H 'Content-Type: application/json' --data '{ "jsonrpc":"2.0", "method":" After this step, you should have a validator node online with a session key for your node. For key management and validator rewards, consult our [validator guide online](https://docs.astar.network/build/validator-guide/configure-node). +## Versioning + +Up to the release `v5.44.0`, **Astar** releases contained both the client & the runtime blobs. +In general, each release contained both, with some specific releases (related to fixes) which only released e.g. client or runtime. +Standard semantic versioning approach was used. + +The new approach will see the split of client & runtime releases. + +The **client release** will continue to follow semantic versioning, continuing where the former approach left off. +E.g. the next expected minor release will be `v5.45.0`. + +The **runtime release** will follow a new versioning approach - `runtime-XXYY`. + +* The `XX` part will be a number of 2 or more digits, starting with **10**, and will be incremented by **1** each time a new runtime release is made. E.g. `runtime-1000` will be followed by `runtime-1100`, which will be followed by `runtime-1200`, and so on. This is like a combination of _major_ and _minor_ semver versions. +* The `YY` part will always be a 2 digit number, and serves as a _patch_ semver version. E.g. if we have `runtime-1000` and need to release a fix, the new release version will be `runtime-1001`. + ## Workspace Dependency Handling All dependencies should be listed inside the workspace's root `Cargo.toml` file.