Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

chore: fetch ssj release #1482

Merged
merged 3 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions .github/workflows/ssj-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ on:
push:
branches:
- main
paths:
- cairo/kakarot-ssj/**
pull_request: {}

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -17,25 +16,48 @@ concurrency:
permissions: read-all

jobs:
paths-filter:
runs-on: ubuntu-latest
outputs:
crates: ${{ steps.filter.outputs.crates }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
crates:
- 'cairo/kakarot-ssj/crates/**'

ssj-build:
needs: paths-filter
if: needs.paths-filter.outputs.crates == 'true'
uses: ./.github/workflows/ssj-build.yml
with:
artifact-name: ssj-build

ssj-tests-unit:
needs: paths-filter
if: needs.paths-filter.outputs.crates == 'true'
uses: ./.github/workflows/ssj-tests-unit.yml
with:
run-fmt-check: false

ssj-ef-tests:
uses: ./.github/workflows/ssj-ef-tests.yml
needs: [ssj-build]
needs:
- ssj-build
- paths-filter
if: needs.paths-filter.outputs.crates == 'true'
with:
artifact-name: ssj-build

ssj-resources:
runs-on: ubuntu-latest
needs: [ssj-ef-tests]
needs:
- ssj-ef-tests
- paths-filter
if: needs.paths-filter.outputs.crates == 'true'
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v2
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/ssj-test.yml

This file was deleted.

20 changes: 15 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,27 @@ endif

.PHONY: build test coverage clean

# 176384150 corresponds to release v0.1.13 of Kakarot SSJ.
KKRT_SSJ_RELEASE_ID = 176384150
# Kakarot SSJ artifacts for precompiles.
KKRT_SSJ_BUILD_ARTIFACT_URL = $(shell curl -L https://api.github.com/repos/kkrt-labs/kakarot-ssj/releases/${KKRT_SSJ_RELEASE_ID} | jq -r '.assets[0].browser_download_url')
KATANA_VERSION = v1.0.0-alpha.14
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))

BUILD_DIR = build
SSJ_DIR = $(BUILD_DIR)/ssj
SSJ_ZIP = dev-artifacts.zip

build-ssj:
@echo "Building Kakarot SSJ"
@mkdir -p $(SSJ_DIR)
@cd cairo/kakarot-ssj && scarb build -p contracts && find target/dev -type f -name '*contracts*' | grep -vE 'test|mock|Mock' | xargs -I {} cp {} ../../$(SSJ_DIR)
$(SSJ_DIR): $(SSJ_ZIP)
rm -rf $(SSJ_DIR)
mkdir -p $(SSJ_DIR)
unzip -o $(SSJ_ZIP) -d $(SSJ_DIR)
rm -f $(SSJ_ZIP)

$(SSJ_ZIP):
curl -sL -o $(SSJ_ZIP) "$(KKRT_SSJ_BUILD_ARTIFACT_URL)"

build: build-ssj
build: $(SSJ_DIR)
uv run compile

deploy: build build-sol
Expand Down
2 changes: 1 addition & 1 deletion docker/deployer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ RUN git clone --depth 1 https://github.com/asdf-vm/asdf.git "$HOME/.asdf" && \
RUN source "$HOME/.asdf/asdf.sh" && asdf plugin add scarb && asdf install scarb 0.7.0 && asdf install scarb 2.6.5 && asdf install scarb 2.8.3

RUN --mount=type=cache,target=/root/.cache \
source "$HOME/.asdf/asdf.sh" && source "$HOME/.cargo/env" && make build-ssj && make build && make build-sol
source "$HOME/.asdf/asdf.sh" && source "$HOME/.cargo/env" && make build && make build-sol


############################################
Expand Down
Loading