-
Notifications
You must be signed in to change notification settings - Fork 11
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
9 changed files
with
259 additions
and
101 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,114 @@ | ||
name: LLVM back-end testing | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- '.github/workflows/llvm-back-end.yml' | ||
- 'build.sh' | ||
|
||
jobs: | ||
build_and_test_llvm_back_end: | ||
name: test | ||
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 }} | ||
- run: ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts | ||
- name: Checkout https://github.com/matter-labs/compiler-tester | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: matter-labs/compiler-tester | ||
#ref: main | ||
ref: ms-update-cargo-config | ||
submodules: recursive | ||
token: ${{ secrets.COMPILER_TESTER_ACCESS_TOKEN }} | ||
path: 'compiler-tester' | ||
ssh-known-hosts: 'github.com' | ||
# ssh-key: ${{ secrets.SSH_KEY }} | ||
|
||
- name: Checkout https://github.com/matter-labs/compiler-llvm | ||
uses: actions/checkout@v2 | ||
with: | ||
path: compiler-llvm | ||
|
||
- name: prepare | ||
shell: bash | ||
run: | | ||
echo "DOCKER_RUNNER=docker-compose -f ${{github.workspace}}/compiler-llvm/infra/docker-compose-runner.yml" >> $GITHUB_ENV | ||
echo "DOCKER_RUN=docker-compose -f ${{github.workspace}}/compiler-llvm/infra/docker-compose-runner.yml exec -T zk" >> $GITHUB_ENV | ||
- name: start-services | ||
run: | | ||
${DOCKER_RUNNER} down | ||
${DOCKER_RUNNER} pull | ||
${DOCKER_RUNNER} up --build -d zk | ||
${DOCKER_RUNNER} exec -T zk sccache --start-server | ||
# - run: ${DOCKER_RUN} sh -c "ssh-keyscan -t rsa github.com >> /root/.ssh/known_hosts" || true | ||
# | ||
# - run: ${DOCKER_RUN} sh -c "ssh-add /ssh-agent/id_rsa" || true | ||
# - run: ${DOCKER_RUN} sh -c "ssh-agent" || true | ||
# - run: ${DOCKER_RUN} sh -c "ssh-add -L" || true | ||
- run: ${DOCKER_RUN} sh -c 'eval "$(ssh-agent -s)"' || true | ||
- run: ${DOCKER_RUN} sh -c "ssh-add -L" || true | ||
- run: ${DOCKER_RUN} sh -c "ssh -T git@github.com" || true | ||
|
||
|
||
- run: ssh -T git@github.com || true | ||
|
||
|
||
|
||
|
||
#DEBUG | ||
# - run: ${DOCKER_RUN} pwd || true | ||
# - run: ${DOCKER_RUN} --project-directory='/usr/src/zksync/compiler-llvm' pwd || true | ||
# - run: ${DOCKER_RUN} --project-directory='./compiler-llvm' pwd || true | ||
# - run: ${DOCKER_RUN} --project-directory=compiler-llvm pwd || true | ||
# - run: ${DOCKER_RUN} -w /usr/src/zksync/compiler-llvm/ pwd || true | ||
# - run: ${DOCKER_RUN} -w ${WORKSPACE}/compiler-llvm/ pwd || true | ||
|
||
# - run: ${DOCKER_RUN} sh -c "apt-get --yes install wget sudo" | ||
|
||
# - name: Building the LLVM framework | ||
# run: | | ||
# chmod +x compiler-llvm/build.sh | ||
# ${DOCKER_RUN} sh -c "cd compiler-llvm && ./build.sh release" | ||
|
||
- name: Downloading the Solidity compiler binaries | ||
run: | | ||
mkdir solc | ||
wget 'https://github.com/ethereum/solc-bin/raw/gh-pages/linux-amd64/solc-linux-amd64-v0.8.0%2Bcommit.c7dfd78e' --output-document "solc/solc-0.8.0" | ||
wget 'https://github.com/ethereum/solc-bin/raw/gh-pages/linux-amd64/solc-linux-amd64-v0.8.1%2Bcommit.df193b15' --output-document "solc/solc-0.8.1" | ||
wget 'https://github.com/ethereum/solc-bin/raw/gh-pages/linux-amd64/solc-linux-amd64-v0.8.2%2Bcommit.661d1103' --output-document "solc/solc-0.8.2" | ||
wget 'https://github.com/ethereum/solc-bin/raw/gh-pages/linux-amd64/solc-linux-amd64-v0.8.3%2Bcommit.8d00100c' --output-document "solc/solc-0.8.3" | ||
wget 'https://github.com/ethereum/solc-bin/raw/gh-pages/linux-amd64/solc-linux-amd64-v0.8.4%2Bcommit.c7e474f2' --output-document "solc/solc-0.8.4" | ||
wget 'https://github.com/ethereum/solc-bin/raw/gh-pages/linux-amd64/solc-linux-amd64-v0.8.5%2Bcommit.a4f2e591' --output-document "solc/solc-0.8.5" | ||
wget 'https://github.com/ethereum/solc-bin/raw/gh-pages/linux-amd64/solc-linux-amd64-v0.8.6%2Bcommit.11564f7e' --output-document "solc/solc-0.8.6" | ||
wget 'https://github.com/ethereum/solc-bin/raw/gh-pages/linux-amd64/solc-linux-amd64-v0.8.7%2Bcommit.e28d00a7' --output-document "solc/solc-0.8.7" | ||
${DOCKER_RUN} mkdir -pv ${HOME}/opt/solc | ||
${DOCKER_RUN} cp -R solc ${HOME}/opt | ||
#DEBUG | ||
# - run: ${DOCKER_RUN} sh -c PATH="${HOME}/opt/solc/:${PATH}" || true | ||
# - run: ${DOCKER_RUN} sh -c export PATH="${PATH}:${HOME}/opt/solc/" || true | ||
# - run: ${DOCKER_RUN} PATH="${HOME}/opt/solc/:${PATH}" || true | ||
# - run: ${DOCKER_RUN} echo ${PATH} | ||
# - run: ${DOCKER_RUN} env | ||
|
||
#DEBUG | ||
# - run: ${DOCKER_RUN} sh -c "mkdir ~/.ssh && ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts" | ||
# | ||
|
||
|
||
#DEBUG | ||
# - run: ${DOCKER_RUN} sh -c "ssh -vT git@github.com" || true | ||
|
||
- name: Building and running the compiler tester | ||
run: | | ||
${DOCKER_RUN} env | ||
${DOCKER_RUN} sh -c "cd compiler-tester && ./run.sh" | ||
env: | ||
CARGO_NET_GIT_FETCH_WITH_CLI: true |
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
Oops, something went wrong.