ci: mover data-root de Docker a /mnt en las lanes runtime (No space l… #17
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
| name: Go CLI | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| workflow_dispatch: {} | |
| jobs: | |
| lint-and-test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| code-quality: write | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - uses: arduino/setup-task@v3 | |
| with: | |
| version: 3.x | |
| - run: task lint | |
| - run: task coverage | |
| - run: task test:integration | |
| - run: task build | |
| - run: ./devcontainer --version | |
| # Convierte el perfil de Go (coverage.out) a Cobertura XML para la | |
| # feature nativa de Code Quality de GitHub. | |
| - name: Convert coverage to Cobertura XML | |
| run: | | |
| go install github.com/boumenot/gocover-cobertura@latest | |
| gocover-cobertura < coverage.out > coverage.xml | |
| - name: Upload coverage report | |
| uses: actions/upload-code-coverage@v1 | |
| with: | |
| file: coverage.xml | |
| language: Go | |
| label: code-coverage/go | |
| - uses: actions/upload-artifact@v7 | |
| if: always() | |
| with: | |
| name: unit-coverage | |
| path: coverage.out | |
| if-no-files-found: error | |
| e2e: | |
| runs-on: ubuntu-latest | |
| needs: lint-and-test | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - uses: arduino/setup-task@v3 | |
| with: | |
| version: 3.x | |
| - run: task test:e2e | |
| - if: always() | |
| run: task clean | |
| # Hermetic parity gate: read-configuration golden comparison + the contract | |
| # lane of the parity matrix (flag validation / output contract, no Docker). | |
| parity: | |
| runs-on: ubuntu-latest | |
| needs: lint-and-test | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "20" | |
| - uses: arduino/setup-task@v3 | |
| with: | |
| version: 3.x | |
| - run: task reference | |
| - run: task parity:contract | |
| - run: task parity:network | |
| - if: always() | |
| run: | | |
| mkdir -p artifacts | |
| git -C reference rev-parse HEAD > artifacts/reference-commit.txt | |
| - uses: actions/upload-artifact@v7 | |
| if: always() | |
| with: | |
| name: parity-contract-network-v0.88.0 | |
| path: artifacts/ | |
| if-no-files-found: error | |
| # Runtime lane of the parity matrix (creates real containers via Docker). | |
| # ubuntu-latest ships with Docker preinstalled. | |
| parity-runtime: | |
| runs-on: ubuntu-latest | |
| needs: lint-and-test | |
| env: | |
| PARITY_RUNTIME_TIMEOUT: "10m" | |
| # 2-core hosted runners can't sustain 2 concurrent heavy docker builds; run | |
| # serially for gate determinism (override with PARITY_PARALLEL for beefy runners). | |
| PARITY_PARALLEL: "1" | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| submodules: recursive | |
| # ubuntu-latest ships only ~14GB free on / but a large ephemeral disk on /mnt. | |
| # The runtime matrix builds many real images; keeping Docker's data-root on / | |
| # exhausts it ("No space left on device"). Move data-root to /mnt and, in the | |
| # same daemon config, enable the containerd image store (needed for cache | |
| # export / --platform, unsupported by the default docker driver). Also drop | |
| # unused preinstalled SDKs to give the root disk headroom (Go/Node are | |
| # reinstalled by the setup steps that follow). | |
| - name: Configure Docker (data-root on /mnt, containerd store) + free disk | |
| run: | | |
| sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android || true | |
| sudo mkdir -p /mnt/docker | |
| echo '{"features":{"containerd-snapshotter":true},"data-root":"/mnt/docker"}' | sudo tee /etc/docker/daemon.json | |
| sudo systemctl restart docker | |
| docker info -f 'root={{.DockerRootDir}} driver={{.DriverStatus}}' | |
| df -h / /mnt | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "20" | |
| - uses: arduino/setup-task@v3 | |
| with: | |
| version: 3.x | |
| - run: task reference | |
| - run: task parity:runtime | |
| - if: always() | |
| run: | | |
| mkdir -p artifacts | |
| git -C reference rev-parse HEAD > artifacts/reference-commit.txt | |
| - uses: actions/upload-artifact@v7 | |
| if: always() | |
| with: | |
| name: parity-runtime-v0.88.0 | |
| path: artifacts/ | |
| if-no-files-found: error | |
| - if: always() | |
| run: task clean | |
| # Experimental, NON-gating: arm64 runtime via QEMU emulation. arm64 runtime is | |
| # unsupported for now, so its cases are skipped-arm64 in the gate above. This job | |
| # is SLOW (QEMU) and only runs on a manual trigger (workflow_dispatch), not on | |
| # every push/PR — enable it when validating arm64. | |
| parity-runtime-arm64-experimental: | |
| if: github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| needs: lint-and-test | |
| continue-on-error: true | |
| env: | |
| PARITY_ARM64: "true" | |
| PARITY_RUNTIME_TIMEOUT: "15m" | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| submodules: recursive | |
| - name: Set up QEMU (arm64 emulation) | |
| uses: docker/setup-qemu-action@v3 | |
| with: | |
| platforms: arm64 | |
| - name: Configure Docker (data-root on /mnt, containerd store) + free disk | |
| run: | | |
| sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android || true | |
| sudo mkdir -p /mnt/docker | |
| echo '{"features":{"containerd-snapshotter":true},"data-root":"/mnt/docker"}' | sudo tee /etc/docker/daemon.json | |
| sudo systemctl restart docker | |
| docker info -f 'root={{.DockerRootDir}} driver={{.DriverStatus}}' | |
| df -h / /mnt | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "20" | |
| - uses: arduino/setup-task@v3 | |
| with: | |
| version: 3.x | |
| - run: task reference | |
| - run: task parity:runtime | |
| - if: always() | |
| run: task clean | |
| cross-compile: | |
| runs-on: ubuntu-latest | |
| needs: lint-and-test | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - uses: arduino/setup-task@v3 | |
| with: | |
| version: 3.x | |
| - run: task build:cross | |
| - run: ls -lh dist/ |