Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ci): hive CI tidy up #2

Merged
merged 1 commit into from
Jul 21, 2022
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
24 changes: 10 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Continuous integration
name: CI
on:
push:
branches:
Expand All @@ -10,8 +10,15 @@ on:
- devel
- alpha
- stable
types:
- opened
- reopened
- synchronize
- ready_for_review

jobs:
tests:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
strategy:
matrix:
os: [ ubuntu-20.04, macos-11 ] # list of os: https://github.com/actions/virtual-environments
Expand Down Expand Up @@ -59,6 +66,7 @@ jobs:
run: make test

tests-windows:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
strategy:
matrix:
os: [ windows-2022 ]
Expand Down Expand Up @@ -97,6 +105,7 @@ jobs:
run: .\wmake.ps1 test

docker:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
Expand All @@ -109,16 +118,3 @@ jobs:
# check with root permissions, should be cached from previous build
- name: sudo make docker
run: sudo DOCKER_TAG=thorax/erigon:ci-$GITHUB_SHA DOCKER_UID=$(id -u) DOCKER_GID=$(id -g) make docker

- name: run hive
run: sudo mkdir /results && docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v ${{ github.workspace }}:/work gatewayfm/hive:latest --sim ethereum/engine --results-root=/work/results --client erigon_ci-$GITHUB_SHA --docker.output --loglevel 5

- name: parse hive output
run: docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v ${{ github.workspace }}:/work --entrypoint /app/hivecioutput gatewayfm/hive:latest --resultsdir=/work/results --outdir=/work/results

- name: archive hive results
uses: actions/upload-artifact@v3
if: always()
with:
name: hive-ci-output
path: results/*.xml
2 changes: 1 addition & 1 deletion .github/workflows/hive-results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Hive results

on:
workflow_run:
workflows: ["Continuous integration", "ci"]
workflows: ["Hive"]
types:
- completed

Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/hive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Hive
on:
workflow_run:
workflows: ["CI"]
types:
- completed

jobs:
hive:
runs-on: ubuntu-20.04
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # fetch git tags for "git describe"

- name: build erigon image
run: DOCKER_TAG=thorax/erigon:ci-$GITHUB_SHA DOCKER_UID=$(id -u) DOCKER_GID=$(id -g) make docker

# check with root permissions, should be cached from previous build
- name: build erigon image (root permissions)
run: sudo DOCKER_TAG=thorax/erigon:ci-$GITHUB_SHA DOCKER_UID=$(id -u) DOCKER_GID=$(id -g) make docker

- name: run hive
run: sudo mkdir /results && docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v ${{ github.workspace }}:/work gatewayfm/hive:latest --sim ethereum/engine --results-root=/work/results --client erigon_ci-$GITHUB_SHA --docker.output --loglevel 5

- name: parse hive output
run: docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v ${{ github.workspace }}:/work --entrypoint /app/hivecioutput gatewayfm/hive:latest --resultsdir=/work/results --outdir=/work/results

- name: archive hive results
uses: actions/upload-artifact@v3
if: always()
with:
name: hive-ci-output
path: results/*.xml