feat: add build root children from proof #2928
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
| name: Build and test | |
| on: [push] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| basic-checks: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Check conventional commit | |
| uses: cocogitto/cocogitto-action@v3 | |
| id: conventional_commit_check | |
| with: | |
| check-latest-tag-only: true | |
| - name: Check license header | |
| uses: viperproject/check-license-header@v2 | |
| with: | |
| path: ./ | |
| config: .github/license-check/config.json | |
| - name: Lint Markdown docs | |
| uses: DavidAnson/markdownlint-cli2-action@v16 | |
| with: | |
| globs: | | |
| *.md | |
| docs/*.md | |
| build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup variables | |
| run: echo ROLLUPS_NODE_VERSION=`make version` >> $GITHUB_ENV | |
| - name: Set up Depot CLI | |
| uses: depot/setup-action@v1 | |
| - name: Build rollups-node image (amd64) | |
| uses: depot/build-push-action@v1 | |
| with: | |
| file: Dockerfile | |
| context: . | |
| platforms: linux/amd64 | |
| tags: ${{ github.repository_owner }}/rollups-node:devel-amd64 | |
| push: false | |
| load: true | |
| project: ${{ vars.DEPOT_PROJECT }} | |
| token: ${{ secrets.DEPOT_TOKEN }} | |
| - name: Build rollups-node image (arm64) | |
| uses: depot/build-push-action@v1 | |
| with: | |
| file: Dockerfile | |
| context: . | |
| platforms: linux/arm64 | |
| tags: ${{ github.repository_owner }}/rollups-node:devel-arm64 | |
| push: false | |
| load: true | |
| project: ${{ vars.DEPOT_PROJECT }} | |
| token: ${{ secrets.DEPOT_TOKEN }} | |
| - name: Build devnet image | |
| uses: depot/build-push-action@v1 | |
| with: | |
| file: test/devnet/Dockerfile | |
| context: . | |
| platforms: linux/amd64 | |
| tags: ${{ github.repository_owner }}/rollups-node-devnet:devel | |
| push: false | |
| load: true | |
| project: ${{ vars.DEPOT_PROJECT }} | |
| token: ${{ secrets.DEPOT_TOKEN }} | |
| - name: Build debian package (amd64) | |
| uses: depot/build-push-action@v1 | |
| with: | |
| file: Dockerfile | |
| context: . | |
| target: debian-packager | |
| platforms: linux/amd64 | |
| tags: ${{ github.repository_owner }}/rollups-node:debian-packager-amd64 | |
| push: false | |
| load: true | |
| project: ${{ vars.DEPOT_PROJECT }} | |
| token: ${{ secrets.DEPOT_TOKEN }} | |
| - name: Export deb package artifact (amd64) | |
| run: make copy-debian-package BUILD_PLATFORM=linux/amd64 DEB_ARCH=amd64 DEB_PACKAGER_IMG=${{ github.repository_owner }}/rollups-node:debian-packager-amd64 | |
| - name: Build debian package (arm64) | |
| uses: depot/build-push-action@v1 | |
| with: | |
| file: Dockerfile | |
| context: . | |
| target: debian-packager | |
| platforms: linux/arm64 | |
| tags: ${{ github.repository_owner }}/rollups-node:debian-packager-arm64 | |
| push: false | |
| load: true | |
| project: ${{ vars.DEPOT_PROJECT }} | |
| token: ${{ secrets.DEPOT_TOKEN }} | |
| - name: Export deb package artifact (arm64) | |
| run: make copy-debian-package BUILD_PLATFORM=linux/arm64 DEB_ARCH=arm64 DEB_PACKAGER_IMG=${{ github.repository_owner }}/rollups-node:debian-packager-arm64 | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifacts | |
| path: | | |
| cartesi-rollups-node-v${{ env.ROLLUPS_NODE_VERSION }}_amd64.deb | |
| cartesi-rollups-node-v${{ env.ROLLUPS_NODE_VERSION }}_arm64.deb | |
| unit-test: | |
| runs-on: ubuntu-24.04 | |
| needs: | |
| - build | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@v4 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Depot CLI | |
| uses: depot/setup-action@v1 | |
| - name: Build rollups-node:tester image | |
| uses: depot/build-push-action@v1 | |
| with: | |
| file: Dockerfile | |
| context: . | |
| target: go-builder | |
| platforms: linux/amd64 | |
| tags: ${{ github.repository_owner }}/rollups-node:tester | |
| push: false | |
| load: true | |
| project: ${{ vars.DEPOT_PROJECT }} | |
| token: ${{ secrets.DEPOT_TOKEN }} | |
| - name: Build devnet image | |
| uses: depot/build-push-action@v1 | |
| with: | |
| file: test/devnet/Dockerfile | |
| context: . | |
| platforms: linux/amd64 | |
| tags: ${{ github.repository_owner }}/rollups-node-devnet:devel | |
| push: false | |
| load: true | |
| project: ${{ vars.DEPOT_PROJECT }} | |
| token: ${{ secrets.DEPOT_TOKEN }} | |
| - name: Download test dependencies | |
| run: | | |
| make download-test-dependencies | |
| - name: Run unit tests | |
| run: | | |
| make test-with-compose | |
| publish_artifacts: | |
| name: Publish artifacts | |
| needs: [basic-checks, build, unit-test] | |
| runs-on: ubuntu-24.04 | |
| if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout emulator source code | |
| uses: actions/checkout@v4 | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| - name: Upload products to GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| draft: true | |
| files: | | |
| artifacts/cartesi-rollups-node-v*.deb |