Skip to content

Commit aca3c5e

Browse files
author
colinlyguo
committed
fix CI scripts
1 parent 0f72ba1 commit aca3c5e

File tree

7 files changed

+82
-40
lines changed

7 files changed

+82
-40
lines changed

.github/workflows/docker.yml

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -307,27 +307,48 @@ jobs:
307307
REPOSITORY: coordinator-api
308308
run: |
309309
aws --region ${{ env.AWS_REGION }} ecr describe-repositories --repository-names ${{ env.REPOSITORY }} && : || aws --region ${{ env.AWS_REGION }} ecr create-repository --repository-name ${{ env.REPOSITORY }}
310-
- name: Setup SSH for private repositories
310+
- name: Setup SSH for repositories and clone them
311311
run: |
312312
mkdir -p ~/.ssh
313313
chmod 700 ~/.ssh
314314
315-
(
316-
echo "${{ secrets.OPENVM_GPU_SSH_PRIVATE_KEY }}"
317-
echo ""
318-
echo "${{ secrets.OPENVM_STARK_GPU_SSH_PRIVATE_KEY }}"
319-
echo ""
320-
echo "${{ secrets.PLONKY3_GPU_SSH_PRIVATE_KEY }}"
321-
) > ~/.ssh/all_keys
322-
323-
chmod 600 ~/.ssh/all_keys
315+
# Setup for plonky3-gpu
316+
echo "${{ secrets.PLONKY3_GPU_SSH_PRIVATE_KEY }}" > ~/.ssh/plonky3_gpu_key
317+
chmod 600 ~/.ssh/plonky3_gpu_key
324318
eval "$(ssh-agent -s)" > /dev/null
325-
ssh-add ~/.ssh/all_keys 2>/dev/null
319+
ssh-add ~/.ssh/plonky3_gpu_key 2>/dev/null
326320
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts 2>/dev/null
321+
echo "Loaded plonky3-gpu key"
322+
323+
# Clone plonky3-gpu repository
324+
./clone_plonky3_gpu.sh
325+
326+
# Setup for openvm-stark-gpu
327+
echo "${{ secrets.OPENVM_STARK_GPU_SSH_PRIVATE_KEY }}" > ~/.ssh/openvm_stark_gpu_key
328+
chmod 600 ~/.ssh/openvm_stark_gpu_key
329+
eval "$(ssh-agent -s)" > /dev/null
330+
ssh-add ~/.ssh/openvm_stark_gpu_key 2>/dev/null
331+
echo "Loaded openvm-stark-gpu key"
332+
333+
# Clone openvm-stark-gpu repository
334+
./clone_openvm_stark_gpu.sh
335+
336+
# Setup for openvm-gpu
337+
echo "${{ secrets.OPENVM_GPU_SSH_PRIVATE_KEY }}" > ~/.ssh/openvm_gpu_key
338+
chmod 600 ~/.ssh/openvm_gpu_key
339+
eval "$(ssh-agent -s)" > /dev/null
340+
ssh-add ~/.ssh/openvm_gpu_key 2>/dev/null
341+
echo "Loaded openvm-gpu key"
342+
343+
# Clone openvm-gpu repository
344+
./clone_openvm_gpu.sh
345+
346+
# Show number of loaded keys
327347
echo "Number of loaded keys: $(ssh-add -l | wc -l)"
328-
- name: Run custom script
348+
349+
- name: Checkout specific commits
329350
run: |
330-
./build/dockerfiles/coordinator-api/init-openvm.sh
351+
./checkout_all.sh
331352
- name: Build and push
332353
uses: docker/build-push-action@v3
333354
env:

build/dockerfiles/coordinator-api.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN cargo chef prepare --recipe-path recipe.json
99
FROM chef as zkp-builder
1010
COPY ./common/libzkp/impl/rust-toolchain ./
1111
COPY --from=planner /app/recipe.json recipe.json
12-
# run ./build/dockerfiles/coordinator-api/init-openvm.sh to get openvm-gpu
12+
# run scripts to get openvm-gpu
1313
COPY ./build/dockerfiles/coordinator-api/plonky3-gpu /plonky3-gpu
1414
COPY ./build/dockerfiles/coordinator-api/openvm-stark-gpu /openvm-stark-gpu
1515
COPY ./build/dockerfiles/coordinator-api/openvm-gpu /openvm-gpu
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
set -uex
3+
4+
PLONKY3_GPU_COMMIT=261b322 # v0.2.0
5+
OPENVM_STARK_GPU_COMMIT=3082234 # PR#48
6+
OPENVM_GPU_COMMIT=8094b4f # branch: patch-v1.2.0
7+
8+
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)
9+
10+
# checkout plonky3-gpu
11+
cd $DIR/plonky3-gpu && git checkout ${PLONKY3_GPU_COMMIT}
12+
13+
# checkout openvm-stark-gpu
14+
cd $DIR/openvm-stark-gpu && git checkout ${OPENVM_STARK_GPU_COMMIT}
15+
16+
# checkout openvm-gpu
17+
cd $DIR/openvm-gpu && git checkout ${OPENVM_GPU_COMMIT}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
set -uex
3+
4+
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)
5+
6+
# clone openvm-gpu if not exists
7+
if [ ! -d $DIR/openvm-gpu ]; then
8+
git clone [email protected]:scroll-tech/openvm-gpu.git $DIR/openvm-gpu
9+
fi
10+
cd $DIR/openvm-gpu && git fetch --all --force
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
set -uex
3+
4+
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)
5+
6+
# clone openvm-stark-gpu if not exists
7+
if [ ! -d $DIR/openvm-stark-gpu ]; then
8+
git clone [email protected]:scroll-tech/openvm-stark-gpu.git $DIR/openvm-stark-gpu
9+
fi
10+
cd $DIR/openvm-stark-gpu && git fetch --all --force
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
set -uex
3+
4+
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)
5+
6+
# clone plonky3-gpu if not exists
7+
if [ ! -d $DIR/plonky3-gpu ]; then
8+
git clone [email protected]:scroll-tech/plonky3-gpu.git $DIR/plonky3-gpu
9+
fi
10+
cd $DIR/plonky3-gpu && git fetch --all --force

build/dockerfiles/coordinator-api/init-openvm.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)