-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up a CI server for the LLVM back-end. #CPR-227
- Loading branch information
Showing
11 changed files
with
195 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: LLVM testing | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
|
||
jobs: | ||
llvm_testing: | ||
runs-on: [self-hosted, CI-worker] | ||
steps: | ||
- uses: AutoModality/action-clean@v1.1.0 | ||
- uses: webfactory/ssh-agent@v0.5.3 | ||
with: | ||
ssh-private-key: ${{ secrets.SSH_PK_BOT }} | ||
- name: prepare run | ||
run: | | ||
echo "COMPOSE_FILE=${{github.workspace}}/compiler-llvm/infra/docker-compose.yml" >> $GITHUB_ENV | ||
echo "COMPOSE_PROJECT_NAME=llvm_testing" >> $GITHUB_ENV | ||
echo "DOCKER_CMD=docker-compose exec -T zk" >> $GITHUB_ENV | ||
- name: Checkout https://github.com/matter-labs/compiler-tester | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: matter-labs/compiler-tester | ||
submodules: recursive | ||
token: ${{ secrets.COMPILER_TESTER_ACCESS_TOKEN }} | ||
path: 'compiler-tester' | ||
|
||
- name: Checkout https://github.com/matter-labs/compiler-llvm | ||
uses: actions/checkout@v2 | ||
with: | ||
path: compiler-llvm | ||
|
||
- name: start-services | ||
run: | | ||
docker-compose pull | ||
docker-compose up -d zk | ||
env: | ||
SSH_PRIVATE_KEY: ${{secrets.SSH_PK_BOT}} | ||
|
||
- name: Tuning a docker. Setting a ssh key. | ||
run: | | ||
${DOCKER_CMD} sh -c 'mkdir -pv /root/.ssh' | ||
${DOCKER_CMD} sh -c 'echo "${SSH_PRIVATE_KEY}" > /root/.ssh/id_rsa' | ||
${DOCKER_CMD} sh -c 'chmod 400 /root/.ssh/id_rsa' | ||
${DOCKER_CMD} sh -c 'touch /root/.ssh/known_hosts' | ||
${DOCKER_CMD} sh -c 'ssh-keyscan github.com >> /root/.ssh/known_hosts' | ||
${DOCKER_CMD} sh -c 'env' | ||
- name: Building the LLVM framework | ||
run: | | ||
chmod +x compiler-llvm/build.sh | ||
# LLVM_VERSION is workaround. It should move to docker. | ||
${DOCKER_CMD} sh -c "cd compiler-llvm && LLVM_VERSION=13 ./build.sh release ci" | ||
- name: Building and running the compiler tester | ||
run: ${DOCKER_CMD} sh -c "cd compiler-tester && ./run.sh" | ||
|
||
- name: Clearing workspace. Removing used and trash images | ||
if: always() | ||
run: | | ||
# Removing trash images. This command isn't remove pulled work image. | ||
docker image prune -f --all | ||
docker-compose down --rmi local -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule compiler-llvm
added at
d68c8e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: '3.2' | ||
services: | ||
zk: | ||
image: "matterlabs/llvm_runner:latest" | ||
working_dir: /usr/src/zksync | ||
command: "tail -f /dev/null" | ||
volumes: | ||
- ${GITHUB_WORKSPACE}:/usr/src/zksync | ||
environment: | ||
- SSH_PRIVATE_KEY=${SSH_PRIVATE_KEY} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
version: '3.2' | ||
services: | ||
zk: | ||
# used docker - https://github.com/matter-labs/compiler-infra/blob/main/images/llvm_runner/Dockerfile | ||
image: "matterlabs/llvm_runner:latest" | ||
# image: "warsmit/test_ci:test" | ||
volumes: | ||
# - ${GITHUB_WORKSPACE}:/usr/src/test | ||
- ${GITHUB_WORKSPACE}:/usr/src/zksync | ||
# - /usr/src/cache:/usr/src/cache | ||
# - /usr/src/keys:/usr/src/keys | ||
- ~/.ssh:/root/.ssh | ||
# - ${SSH_AUTH_SOCK}:/ssh-agent | ||
# - ~/.ssh/known_hosts:/root/.ssh/known_hosts | ||
working_dir: /usr/src/test | ||
environment: | ||
- IN_DOCKER=true | ||
# - CACHE_DIR=/usr/src/cache | ||
# - SCCACHE_CACHE_SIZE=50g | ||
- CI=1 | ||
# - SSH_AUTH_SOCK=/ssh-agent |