|
11 | 11 |
|
12 | 12 | steps: |
13 | 13 | - name: Checkout |
14 | | - uses: actions/checkout@v4 |
| 14 | + uses: actions/checkout@v5 |
15 | 15 |
|
16 | 16 | - name: Install system dependencies |
17 | 17 | run: | |
@@ -46,3 +46,203 @@ jobs: |
46 | 46 | - name: Test |
47 | 47 | timeout-minutes: 15 |
48 | 48 | run: RUN_ANVIL_TESTS=1 cargo test --workspace --all-targets --all-features --locked |
| 49 | + |
| 50 | + canonical-guest: |
| 51 | + runs-on: ubuntu-latest |
| 52 | + needs: rust |
| 53 | + timeout-minutes: 45 |
| 54 | + |
| 55 | + steps: |
| 56 | + - name: Checkout |
| 57 | + uses: actions/checkout@v5 |
| 58 | + |
| 59 | + - name: Install system dependencies |
| 60 | + run: | |
| 61 | + sudo apt-get update |
| 62 | + sudo apt-get install -y \ |
| 63 | + lua5.4 \ |
| 64 | + liblua5.4-dev \ |
| 65 | + libslirp-dev \ |
| 66 | + ca-certificates \ |
| 67 | + wget \ |
| 68 | + xz-utils |
| 69 | +
|
| 70 | + - name: Install xgenext2fs |
| 71 | + run: | |
| 72 | + set -euo pipefail |
| 73 | + ARCH="$(dpkg --print-architecture)" |
| 74 | + VERSION="v1.5.5" |
| 75 | +
|
| 76 | + case "${ARCH}" in |
| 77 | + amd64) |
| 78 | + DEB_SHA256="e42857c454a772553e2bec5e73ac499b39d35dbf622bdb4cbb1b19fe98f62999" |
| 79 | + ;; |
| 80 | + arm64) |
| 81 | + DEB_SHA256="a9964903e9d4c1006dc9d88b4823be14d2eccaf66007c48e76c883e17db2880c" |
| 82 | + ;; |
| 83 | + *) |
| 84 | + echo "unsupported arch for xgenext2fs: ${ARCH}" >&2 |
| 85 | + exit 1 |
| 86 | + ;; |
| 87 | + esac |
| 88 | +
|
| 89 | + wget -O /tmp/xgenext2fs.deb "https://github.com/cartesi/genext2fs/releases/download/${VERSION}/xgenext2fs_${ARCH}.deb" |
| 90 | + echo "${DEB_SHA256} /tmp/xgenext2fs.deb" | sha256sum --check |
| 91 | + sudo apt-get update |
| 92 | + sudo apt-get install -y /tmp/xgenext2fs.deb |
| 93 | +
|
| 94 | + - name: Install cartesi-machine (machine emulator CLI) |
| 95 | + run: | |
| 96 | + set -euo pipefail |
| 97 | + ARCH="$(dpkg --print-architecture)" |
| 98 | + VERSION="v0.20.0-test2" |
| 99 | +
|
| 100 | + case "${ARCH}" in |
| 101 | + amd64) |
| 102 | + DEB_SHA256="39bbfc96a6cc6606307294b719df65f4f2725e8d200d062bcbd8c22355b99b56" |
| 103 | + ;; |
| 104 | + arm64) |
| 105 | + DEB_SHA256="787d823756000cdecd72da8a3494b4c08613087379035959e561bbaef7a220ba" |
| 106 | + ;; |
| 107 | + *) |
| 108 | + echo "unsupported arch for machine-emulator: ${ARCH}" >&2 |
| 109 | + exit 1 |
| 110 | + ;; |
| 111 | + esac |
| 112 | +
|
| 113 | + wget -O /tmp/machine-emulator.deb "https://github.com/cartesi/machine-emulator/releases/download/${VERSION}/machine-emulator_${ARCH}.deb" |
| 114 | + echo "${DEB_SHA256} /tmp/machine-emulator.deb" | sha256sum --check |
| 115 | + sudo apt-get update |
| 116 | + sudo apt-get install -y /tmp/machine-emulator.deb |
| 117 | + cartesi-machine --version |
| 118 | +
|
| 119 | + - name: Set up QEMU |
| 120 | + uses: docker/setup-qemu-action@v3 |
| 121 | + |
| 122 | + - name: Set up Docker Buildx |
| 123 | + uses: docker/setup-buildx-action@v3 |
| 124 | + |
| 125 | + - name: Install Rust toolchain |
| 126 | + uses: dtolnay/rust-toolchain@stable |
| 127 | + with: |
| 128 | + components: rustfmt |
| 129 | + |
| 130 | + - name: Cache Rust artifacts |
| 131 | + uses: Swatinem/rust-cache@v2 |
| 132 | + |
| 133 | + - name: Install just |
| 134 | + uses: taiki-e/install-action@v2 |
| 135 | + with: |
| 136 | + tool: just |
| 137 | + |
| 138 | + - name: Install cross |
| 139 | + uses: taiki-e/install-action@v2 |
| 140 | + with: |
| 141 | + tool: cross |
| 142 | + |
| 143 | + - name: Download canonical app deps |
| 144 | + run: just -f examples/canonical-app/justfile download-deps |
| 145 | + |
| 146 | + - name: Run guest tests |
| 147 | + run: just canonical-test-guest |
| 148 | + |
| 149 | + rollups-e2e: |
| 150 | + runs-on: ubuntu-latest |
| 151 | + needs: rust |
| 152 | + timeout-minutes: 60 |
| 153 | + |
| 154 | + steps: |
| 155 | + - name: Checkout |
| 156 | + uses: actions/checkout@v5 |
| 157 | + |
| 158 | + - name: Install system dependencies |
| 159 | + run: | |
| 160 | + sudo apt-get update |
| 161 | + sudo apt-get install -y \ |
| 162 | + lua5.4 \ |
| 163 | + liblua5.4-dev \ |
| 164 | + libslirp-dev \ |
| 165 | + ca-certificates \ |
| 166 | + wget \ |
| 167 | + xz-utils |
| 168 | +
|
| 169 | + - name: Install xgenext2fs |
| 170 | + run: | |
| 171 | + set -euo pipefail |
| 172 | + ARCH="$(dpkg --print-architecture)" |
| 173 | + VERSION="v1.5.5" |
| 174 | +
|
| 175 | + case "${ARCH}" in |
| 176 | + amd64) |
| 177 | + DEB_SHA256="e42857c454a772553e2bec5e73ac499b39d35dbf622bdb4cbb1b19fe98f62999" |
| 178 | + ;; |
| 179 | + arm64) |
| 180 | + DEB_SHA256="a9964903e9d4c1006dc9d88b4823be14d2eccaf66007c48e76c883e17db2880c" |
| 181 | + ;; |
| 182 | + *) |
| 183 | + echo "unsupported arch for xgenext2fs: ${ARCH}" >&2 |
| 184 | + exit 1 |
| 185 | + ;; |
| 186 | + esac |
| 187 | +
|
| 188 | + wget -O /tmp/xgenext2fs.deb "https://github.com/cartesi/genext2fs/releases/download/${VERSION}/xgenext2fs_${ARCH}.deb" |
| 189 | + echo "${DEB_SHA256} /tmp/xgenext2fs.deb" | sha256sum --check |
| 190 | + sudo apt-get update |
| 191 | + sudo apt-get install -y /tmp/xgenext2fs.deb |
| 192 | +
|
| 193 | + - name: Install cartesi-machine (machine emulator CLI) |
| 194 | + run: | |
| 195 | + set -euo pipefail |
| 196 | + ARCH="$(dpkg --print-architecture)" |
| 197 | + VERSION="v0.20.0-test2" |
| 198 | +
|
| 199 | + case "${ARCH}" in |
| 200 | + amd64) |
| 201 | + DEB_SHA256="39bbfc96a6cc6606307294b719df65f4f2725e8d200d062bcbd8c22355b99b56" |
| 202 | + ;; |
| 203 | + arm64) |
| 204 | + DEB_SHA256="787d823756000cdecd72da8a3494b4c08613087379035959e561bbaef7a220ba" |
| 205 | + ;; |
| 206 | + *) |
| 207 | + echo "unsupported arch for machine-emulator: ${ARCH}" >&2 |
| 208 | + exit 1 |
| 209 | + ;; |
| 210 | + esac |
| 211 | +
|
| 212 | + wget -O /tmp/machine-emulator.deb "https://github.com/cartesi/machine-emulator/releases/download/${VERSION}/machine-emulator_${ARCH}.deb" |
| 213 | + echo "${DEB_SHA256} /tmp/machine-emulator.deb" | sha256sum --check |
| 214 | + sudo apt-get update |
| 215 | + sudo apt-get install -y /tmp/machine-emulator.deb |
| 216 | + cartesi-machine --version |
| 217 | +
|
| 218 | + - name: Set up QEMU |
| 219 | + uses: docker/setup-qemu-action@v3 |
| 220 | + |
| 221 | + - name: Set up Docker Buildx |
| 222 | + uses: docker/setup-buildx-action@v3 |
| 223 | + |
| 224 | + - name: Install Rust toolchain |
| 225 | + uses: dtolnay/rust-toolchain@stable |
| 226 | + with: |
| 227 | + components: rustfmt |
| 228 | + |
| 229 | + - name: Cache Rust artifacts |
| 230 | + uses: Swatinem/rust-cache@v2 |
| 231 | + |
| 232 | + - name: Install Foundry |
| 233 | + uses: foundry-rs/foundry-toolchain@v1 |
| 234 | + with: |
| 235 | + version: v1.4.3 |
| 236 | + |
| 237 | + - name: Install just |
| 238 | + uses: taiki-e/install-action@v2 |
| 239 | + with: |
| 240 | + tool: just |
| 241 | + |
| 242 | + - name: Install cross |
| 243 | + uses: taiki-e/install-action@v2 |
| 244 | + with: |
| 245 | + tool: cross |
| 246 | + |
| 247 | + - name: Run rollups E2E tests |
| 248 | + run: just test-rollups-e2e |
0 commit comments