Skip to content

Commit

Permalink
Merge branch 'master' into feat/guest-example
Browse files Browse the repository at this point in the history
  • Loading branch information
kunxian-xia authored Nov 18, 2024
2 parents 7e00fac + f003180 commit 40b2cc4
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
skip_check:
runs-on: ubuntu-24.04
runs-on: [self-hosted, Linux, X64]
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
Expand All @@ -30,7 +30,7 @@ jobs:
name: Integration testing
timeout-minutes: 30
runs-on: ubuntu-24.04
runs-on: [self-hosted, Linux, X64]

strategy:
matrix:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
skip_check:
runs-on: ubuntu-24.04
runs-on: [self-hosted, Linux, X64]
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
Expand All @@ -30,7 +30,7 @@ jobs:
name: Various lints
timeout-minutes: 30
runs-on: ubuntu-24.04
runs-on: [self-hosted, Linux, X64]

strategy:
matrix:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
skip_check:
runs-on: ubuntu-24.04
runs-on: [self-hosted, Linux, X64]
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
Expand All @@ -29,7 +29,7 @@ jobs:
(github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true')
name: Run Tests
timeout-minutes: 30
runs-on: ubuntu-24.04
runs-on: [self-hosted, Linux, X64]

strategy:
matrix:
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,12 @@ cargo clippy
```

Alas, `cargo build` doesn't work. That's a known problem and we're working on it. Please use `cargo make build` instead for now.

### Setting up self-hosted CI docker container

To set up docker container for CI, you can run the following command:

```sh
docker build -t ceno-runner scripts/ci/
docker run -d ceno-runner
```
31 changes: 31 additions & 0 deletions scripts/ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# this dockerfile is borrowed from https://baccini-al.medium.com/how-to-containerize-a-github-actions-self-hosted-runner-5994cc08b9fb
FROM ubuntu:22.04

ARG DEBIAN_FRONTEND=noninteractive
ARG RUNNER_VERSION="2.320.0"
ARG CHECKSUM="93ac1b7ce743ee85b5d386f5c1787385ef07b3d7c728ff66ce0d3813d5f46900"

RUN apt update -y && apt upgrade -y && useradd -m docker
RUN apt install -y --no-install-recommends \
curl jq build-essential libssl-dev libffi-dev python3 python3-venv python3-dev python3-pip

# these are the dependencies of actions-runner
RUN apt install -y --no-install-recommends \
libkrb5-3 zlib1g libicu70

RUN cd /home/docker && mkdir actions-runner && cd actions-runner \
&& curl -o actions-runner-linux-x64-$RUNNER_VERSION.tar.gz -L https://github.com/actions/runner/releases/download/v$RUNNER_VERSION/actions-runner-linux-x64-$RUNNER_VERSION.tar.gz \
&& echo "$CHECKSUM actions-runner-linux-x64-$RUNNER_VERSION.tar.gz" | shasum -a 256 -c \
&& tar xzf ./actions-runner-linux-x64-$RUNNER_VERSION.tar.gz

RUN chown -R docker ~docker && cd /home/docker/actions-runner/bin/ \
&& chmod +x installdependencies.sh \
&& ./installdependencies.sh

COPY start.sh start.sh
RUN chmod +x start.sh

# GitHub action runner scripts (config.sh and run.sh) are not allowed to be run as root
USER docker

ENTRYPOINT ["./start.sh"]
7 changes: 7 additions & 0 deletions scripts/ci/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

cd /home/docker/actions-runner/
echo "begin to configure"
./config.sh --url https://github.com/scroll-tech/ceno --token $TOKEN

./run.sh

0 comments on commit 40b2cc4

Please sign in to comment.