diff --git a/.github/actions/cargo-risczero-install/action.yaml b/.github/actions/cargo-risczero-install/action.yaml index 8d72e0b8..4a609805 100644 --- a/.github/actions/cargo-risczero-install/action.yaml +++ b/.github/actions/cargo-risczero-install/action.yaml @@ -2,9 +2,19 @@ name: cargo risczero install description: Install cargo risczero, build toolchains, and r0vm. inputs: + version: + description: | + crates.io version specifier to use when installing cargo-risczero + + Mutually exclusive with ref. + required: false + type: string ref: - description: 'Git reference to pull from risc0/risc0 and build' - required: true + description: | + Git reference to pull from risc0/risc0 and build' + + Mutually exclusive with version. + required: false type: string toolchain-version: description: 'Version of the RISC Zero toolchains to install' @@ -20,21 +30,44 @@ inputs: runs: using: composite steps: + - name: validate inputs + shell: bash + run: | + if [ ! -z "${{ inputs.version }}" ] && [ ! -z "${{ inputs.ref }}" ]; then + echo "Error: Cannot specify both 'version' and 'ref' parameters" + exit 1 + fi + if [ -z "${{ inputs.version }}" ] && [ -z "${{ inputs.ref }}" ]; then + echo "Error: Must specify either 'version' or 'ref' parameter" + exit 1 + fi + + # Only run these steps if using ref (building from source) - name: checkout risc0 + if: inputs.ref != '' uses: actions/checkout@v4 with: repository: 'risc0/risc0' path: 'tmp/risc0' ref: ${{ inputs.ref }} lfs: true - - name: install cargo-risczero + - name: install cargo-risczero from git + if: inputs.ref != '' run: cargo install --locked --path risc0/cargo-risczero --no-default-features --features "${{ inputs.features }}" working-directory: tmp/risc0 shell: bash - - name: install r0vm + - name: install r0vm from git + if: inputs.ref != '' run: cargo install --locked --bin r0vm --path risc0/cargo-risczero --features "${{ inputs.features }}" shell: bash working-directory: tmp/risc0 + + # Only run this step if using version (installing from crates.io) + - name: install cargo-risczero from crates.io + if: inputs.version != '' + run: cargo install --locked cargo-risczero --version "${{ inputs.version }}" --no-default-features --features "${{ inputs.features }}" + shell: bash + - name: install toolchains run: cargo risczero install ${{ inputs.toolchain-version != '' && format('--version {0}', inputs.toolchain-version) || '' }} shell: bash diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 80ae37c3..4974f045 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -18,7 +18,7 @@ permissions: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} RISC0_TOOLCHAIN_VERSION: r0.1.81.0 - RISC0_MONOREPO_REF: "release-1.2" + RISC0_VERSION: "^1.2" jobs: e2e-tests: @@ -69,7 +69,7 @@ jobs: - uses: foundry-rs/foundry-toolchain@v1 - uses: ./.github/actions/cargo-risczero-install with: - ref: ${{ env.RISC0_MONOREPO_REF }} + version: ${{ env.RISC0_VERSION }} toolchain-version: ${{ env.RISC0_TOOLCHAIN_VERSION }} features: ${{ matrix.feature }} - name: Setup Kurtosis diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8d664ecf..f74000db 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ permissions: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} RISC0_TOOLCHAIN_VERSION: r0.1.81.0 - RISC0_MONOREPO_REF: "release-1.2" + RISC0_VERSION: "^1.2" # CARGO_LOCKED is defined as the string '--locked' in PRs targeting release branches and '' elsewhere. CARGO_LOCKED: ${{ (startsWith(github.base_ref, 'release-') || startsWith(github.base_ref, 'refs/heads/release-')) && '--locked' || '' }} @@ -94,7 +94,7 @@ jobs: key: ${{ matrix.os }}-${{ matrix.feature }} - uses: ./.github/actions/cargo-risczero-install with: - ref: ${{ env.RISC0_MONOREPO_REF }} + version: ${{ env.RISC0_VERSION }} toolchain-version: ${{ env.RISC0_TOOLCHAIN_VERSION }} features: ${{ matrix.feature }} - name: cargo clippy risc0-ethereum @@ -144,7 +144,7 @@ jobs: key: ${{ matrix.os }}-${{ matrix.feature }} - uses: ./.github/actions/cargo-risczero-install with: - ref: ${{ env.RISC0_MONOREPO_REF }} + version: ${{ env.RISC0_VERSION }} toolchain-version: ${{ env.RISC0_TOOLCHAIN_VERSION }} features: ${{ matrix.feature }} - uses: foundry-rs/foundry-toolchain@v1 @@ -187,7 +187,7 @@ jobs: key: ${{ matrix.os }}-${{ matrix.feature }} - uses: ./.github/actions/cargo-risczero-install with: - ref: ${{ env.RISC0_MONOREPO_REF }} + version: ${{ env.RISC0_VERSION }} toolchain-version: ${{ env.RISC0_TOOLCHAIN_VERSION }} features: ${{ matrix.feature }} - uses: foundry-rs/foundry-toolchain@v1 diff --git a/contracts/deployment.toml b/contracts/deployment.toml index 7e0c1aae..e80d3439 100644 --- a/contracts/deployment.toml +++ b/contracts/deployment.toml @@ -33,7 +33,6 @@ version = "1.2.0" selector = "0xc101b42b" verifier = "0xAC292cF957Dd5BA174cdA13b05C16aFC71700327" estop = "0x03B66cEDaB014Ca7E970Bfb83C1951d10DD2A805" -unroutable = true # remove when added to the router ### @@ -156,7 +155,6 @@ version = "1.2.0" selector = "0xc101b42b" verifier = "0xAC292cF957Dd5BA174cdA13b05C16aFC71700327" estop = "0x03B66cEDaB014Ca7E970Bfb83C1951d10DD2A805" -unroutable = true # remove when added to the router ### @@ -232,7 +230,6 @@ version = "1.2.0" selector = "0xc101b42b" verifier = "0x8062Dc6C824F10e62E47FdC55A0ecD54C2641F2d" estop = "0x5b188d3d31f7bcfC2e3A22F85c3ca4dD23a77dD1" -unroutable = true # remove when added to the router ### @@ -307,7 +304,6 @@ version = "1.2.0" selector = "0xc101b42b" verifier = "0xAC292cF957Dd5BA174cdA13b05C16aFC71700327" estop = "0x03B66cEDaB014Ca7E970Bfb83C1951d10DD2A805" -unroutable = true # remove when added to the router ### @@ -382,7 +378,6 @@ version = "1.2.0" selector = "0xc101b42b" verifier = "0xAC292cF957Dd5BA174cdA13b05C16aFC71700327" estop = "0x03B66cEDaB014Ca7E970Bfb83C1951d10DD2A805" -unroutable = true # remove when added to the router ### @@ -460,7 +455,6 @@ version = "1.2.0" selector = "0xc101b42b" verifier = "0x8C8b557C6EBDA8E6D62E7b54B7B5Ed8cFa8B48B4" estop = "0x6Fb722974D67A55091c70129Bd0Bb06ec025ce5D" -unroutable = true # remove when added to the router ### @@ -545,7 +539,6 @@ version = "1.2.0" selector = "0xc101b42b" verifier = "0x8062Dc6C824F10e62E47FdC55A0ecD54C2641F2d" estop = "0x5b188d3d31f7bcfC2e3A22F85c3ca4dD23a77dD1" -unroutable = true # remove when added to the router ###