-
Notifications
You must be signed in to change notification settings - Fork 779
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
[Merged by Bors] - Add self-hosted runners v2 #4506
Changes from 36 commits
6e639fe
769b130
da921b0
2eb7457
42ca4c8
9a4c459
d369c18
eba6dd3
9e5e0f2
8bc4e99
3472e60
e705411
853d447
d85891e
bc883e6
a90df60
7148b13
04deb0f
5880179
4749645
1cd9e9d
74542b7
c3625d3
7db66c7
e008422
b62e79a
c7862f9
d92bf62
a0619ac
b57c114
c9476bd
7f45652
2f9243f
0adaf83
21be30c
acb9c29
ce4ed6e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,8 @@ env: | |
PINNED_NIGHTLY: nightly-2023-04-16 | ||
# Prevent Github API rate limiting. | ||
LIGHTHOUSE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# Enable self-hosted runners for the sigp repo only. | ||
SELF_HOSTED_RUNNERS: ${{ github.repository == 'sigp/lighthouse' }} | ||
jobs: | ||
target-branch-check: | ||
name: target-branch-check | ||
|
@@ -48,11 +50,13 @@ jobs: | |
run: make cargo-fmt | ||
release-tests-ubuntu: | ||
name: release-tests-ubuntu | ||
runs-on: ubuntu-latest | ||
# Use self-hosted runners only on the sigp repo. | ||
runs-on: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "linux", "large"]') || 'ubuntu-latest' }} | ||
needs: cargo-fmt | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Get latest version of stable Rust | ||
if: env.SELF_HOSTED_RUNNERS == false | ||
run: rustup update stable | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612 | ||
|
@@ -61,14 +65,15 @@ jobs: | |
- name: Install Foundry (anvil) | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
- name: Run tests in release | ||
run: make test-release | ||
run: WATCH_HOST=host.docker.internal make test-release | ||
release-tests-windows: | ||
name: release-tests-windows | ||
runs-on: windows-2019 | ||
runs-on: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "windows"]') || 'windows-2019' }} | ||
needs: cargo-fmt | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Get latest version of stable Rust | ||
if: env.SELF_HOSTED_RUNNERS == false | ||
run: rustup update stable | ||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
|
@@ -83,6 +88,7 @@ jobs: | |
- name: Install make | ||
run: choco install -y make | ||
- uses: KyleMayes/install-llvm-action@v1 | ||
if: env.SELF_HOSTED_RUNNERS == false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we're good with this but just something worth thinking - Is there any benefit of leaving these conditionals out? There are a few benefits:
Downside:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIRC the self-hosted runners fail if we run that llvm install action. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same with the Rust update ones. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ahh privileges! happy to leave it as it is 👍 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO it would be ideal if we can have the images perform exactly the same. Perhaps we can make an issue to come back for it. I suspect that we're going to eventually drift into the territory of Github-hosted runners failing, though. If we're not actually testing on the Github-hosted ones they're bound to bit-rot. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, that's a good point - I'm hesitant to make the workflow more complicated, but if we really want to run GitHub-hosted runners, we could still run them on PRs, and use the self-hosted ones on |
||
with: | ||
version: "15.0" | ||
directory: ${{ runner.temp }}/llvm | ||
|
@@ -92,11 +98,13 @@ jobs: | |
run: make test-release | ||
beacon-chain-tests: | ||
name: beacon-chain-tests | ||
runs-on: ubuntu-latest | ||
# Use self-hosted runners only on the sigp repo. | ||
runs-on: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "linux", "large"]') || 'ubuntu-latest' }} | ||
needs: cargo-fmt | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Get latest version of stable Rust | ||
if: env.SELF_HOSTED_RUNNERS == false | ||
run: rustup update stable | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612 | ||
|
@@ -130,11 +138,13 @@ jobs: | |
run: make test-slasher | ||
debug-tests-ubuntu: | ||
name: debug-tests-ubuntu | ||
runs-on: ubuntu-22.04 | ||
paulhauner marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# Use self-hosted runners only on the sigp repo. | ||
runs-on: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "linux", "large"]') || 'ubuntu-latest' }} | ||
needs: cargo-fmt | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Get latest version of stable Rust | ||
if: env.SELF_HOSTED_RUNNERS == false | ||
run: rustup update stable | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612 | ||
|
@@ -143,7 +153,7 @@ jobs: | |
- name: Install Foundry (anvil) | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
- name: Run tests in debug | ||
run: make test-debug | ||
run: WATCH_HOST=host.docker.internal make test-debug | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above |
||
state-transition-vectors-ubuntu: | ||
name: state-transition-vectors-ubuntu | ||
runs-on: ubuntu-latest | ||
|
@@ -160,11 +170,13 @@ jobs: | |
run: make run-state-transition-tests | ||
ef-tests-ubuntu: | ||
name: ef-tests-ubuntu | ||
runs-on: ubuntu-latest | ||
# Use self-hosted runners only on the sigp repo. | ||
runs-on: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "linux", "small"]') || 'ubuntu-latest' }} | ||
needs: cargo-fmt | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Get latest version of stable Rust | ||
if: env.SELF_HOSTED_RUNNERS == false | ||
run: rustup update stable | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this may not work on GitHub hosted runners if they're not running in docker containers, perhaps we can leave it empty if
env.SELF_HOSTED_RUNNERS == false
so it defaults tolocalhost
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, I had a shot at fixing this in ce4ed6e.