Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): Build and test on 32-bit platforms #849

Open
clabby opened this issue Nov 27, 2024 · 0 comments
Open

chore(ci): Build and test on 32-bit platforms #849

clabby opened this issue Nov 27, 2024 · 0 comments
Labels
A-ci Area: CI K-chore Kind: chore M-good-first-issue Meta: Good for newcomers

Comments

@clabby
Copy link
Collaborator

clabby commented Nov 27, 2024

Overview

Users of kona run on both 32-bit and 64-bit platforms, and there's currently no job in kona's CI to build and test on 32-bit platforms. This can cause us to easily break the build for downstream consumers without knowing.

We should add a 32-bit linux platform target for the client / host job

host-client-offline-runs:
name: ${{ matrix.target}} | ${{ matrix.name }}
strategy:
matrix:
target: ["native", "asterisc"]
name: ["OP Sepolia (Granite) - Block #16491249"]
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout sources
uses: actions/checkout@v4
- uses: taiki-e/install-action@just
- name: Install Rust stable toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
prefix-key: ${{ matrix.target }}-${{ matrix.name }}
- name: Log into ghcr
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Clone `asterisc` repository
if: "!contains(matrix.target, 'native')"
run: |
git clone https://github.com/ethereum-optimism/asterisc.git
- name: Setup Go toolchain
if: "!contains(matrix.target, 'native')"
uses: actions/setup-go@v5
with:
go-version: "1.21.6"
cache-dependency-path: |
asterisc/go.sum
- name: Build `asterisc`
if: "!contains(matrix.target, 'native')"
run: |
cd asterisc && git checkout v1.1.2 && make build-rvgo
mv ./rvgo/bin/asterisc /usr/local/bin/
- name: Set run environment
run: |
if [[ ${{ contains(matrix.name, 16491249) }} == true ]]; then
BLOCK_NUMBER=16491249
echo "BLOCK_NUMBER=$BLOCK_NUMBER" >> $GITHUB_ENV
echo "L2_CLAIM=0x82da7204148ba4d8d59e587b6b3fdde5561dc31d9e726220f7974bf9f2158d75" >> $GITHUB_ENV
echo "L2_OUTPUT_ROOT=0xa548f22e1aa590de7ed271e3eab5b66c6c3db9b8cb0e3f91618516ea9ececde4" >> $GITHUB_ENV
echo "L2_HEAD=0x09b298a83baf4c2e3c6a2e355bb09e27e3fdca435080e8754f8749233d7333b2" >> $GITHUB_ENV
echo "L1_HEAD=0x33a3e5721faa4dc6f25e75000d9810fd6c41320868f3befcc0c261a71da398e1" >> $GITHUB_ENV
echo "L2_CHAIN_ID=11155420" >> $GITHUB_ENV
echo "WITNESS_TAR_NAME=granite-op-sepolia-$BLOCK_NUMBER-witness.tar.zst" >> $GITHUB_ENV
fi
- name: Decompress witness data directory
run: |
tar --zstd -xvf ./bin/client/testdata/$WITNESS_TAR_NAME -C .
- name: Run host + client offline
working-directory: ./bin/client
run: |
mkdir -p ../../target
just run-client-${{ matrix.target }}-offline \
$BLOCK_NUMBER \
$L2_CLAIM \
$L2_OUTPUT_ROOT \
$L2_HEAD \
$L1_HEAD \
$L2_CHAIN_ID

and also add a build job for a 32-bit linux patform in

cargo-build:
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
matrix:
target: ["native", "cannon", "asterisc"]
name: build-${{ matrix.target }}
continue-on-error: true
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: true
- uses: taiki-e/install-action@just
- name: Install Rust stable toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
prefix-key: ${{ matrix.target }}
- name: Log into ghcr
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build
run: just build-${{ matrix.target }}
- name: chown target
run: |
sudo chown -R $(id -u):$(id -g) ./target

@clabby clabby added A-ci Area: CI K-chore Kind: chore M-good-first-issue Meta: Good for newcomers labels Nov 27, 2024
@clabby clabby linked a pull request Nov 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ci Area: CI K-chore Kind: chore M-good-first-issue Meta: Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant