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

ci: update runners (part 2) #6972

Merged
merged 9 commits into from
Feb 1, 2024
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
22 changes: 11 additions & 11 deletions .github/scripts/matrices.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

# A runner target
class Target:
# GitHub runner OS
os_id: str
# GHA runner
runner_label: str
# Rust target triple
target: str
# SVM Solc target
svm_target_platform: str

def __init__(self, os_id: str, target: str, svm_target_platform: str):
self.os_id = os_id
def __init__(self, runner_label: str, target: str, svm_target_platform: str):
self.runner_label = runner_label
self.target = target
self.svm_target_platform = svm_target_platform

Expand Down Expand Up @@ -42,7 +42,7 @@ def __init__(
# GHA matrix entry
class Expanded:
name: str
os: str
runner_label: str
target: str
svm_target_platform: str
flags: str
Expand All @@ -51,25 +51,25 @@ class Expanded:
def __init__(
self,
name: str,
os: str,
runner_label: str,
target: str,
svm_target_platform: str,
flags: str,
partition: int,
):
self.name = name
self.os = os
self.runner_label = runner_label
self.target = target
self.svm_target_platform = svm_target_platform
self.flags = flags
self.partition = partition


is_pr = os.environ.get("EVENT_NAME") == "pull_request"
t_linux_x86 = Target("ubuntu-latest", "x86_64-unknown-linux-gnu", "linux-amd64")
t_linux_x86 = Target("Linux-22.04", "x86_64-unknown-linux-gnu", "linux-amd64")
# TODO: Figure out how to make this work
# t_linux_arm = Target("ubuntu-latest", "aarch64-unknown-linux-gnu", "linux-aarch64")
t_macos = Target("macos-latest", "x86_64-apple-darwin", "macosx-amd64")
# t_linux_arm = Target("Linux-22.04", "aarch64-unknown-linux-gnu", "linux-aarch64")
t_macos = Target("macos-latest-large", "x86_64-apple-darwin", "macosx-amd64")
t_windows = Target("windows-latest", "x86_64-pc-windows-msvc", "windows-amd64")
targets = [t_linux_x86, t_windows] if is_pr else [t_linux_x86, t_macos, t_windows]

Expand Down Expand Up @@ -129,7 +129,7 @@ def main():

obj = Expanded(
name=name,
os=target.os_id,
runner_label=target.runner_label,
target=target.target,
svm_target_platform=target.svm_target_platform,
flags=flags,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:

jobs:
container:
runs-on: ubuntu-20.04
runs-on: Linux-20.04
# https://docs.github.com/en/actions/reference/authentication-in-a-workflow
permissions:
id-token: write
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,22 @@ jobs:
# `target`: Rust build target triple
# `platform` and `arch`: Used in tarball names
# `svm`: target platform to use for the Solc binary: https://github.com/roynalnaruto/svm-rs/blob/84cbe0ac705becabdc13168bae28a45ad2299749/svm-builds/build.rs#L4-L24
- os: ubuntu-20.04
- os: Linux-20.04
target: x86_64-unknown-linux-gnu
svm_target_platform: linux-amd64
platform: linux
arch: amd64
- os: ubuntu-20.04
- os: Linux-20.04
target: aarch64-unknown-linux-gnu
svm_target_platform: linux-aarch64
platform: linux
arch: arm64
- os: macos-latest
- os: macos-latest-large
target: x86_64-apple-darwin
svm_target_platform: macosx-amd64
platform: darwin
arch: amd64
- os: macos-latest
- os: macos-latest-large
target: aarch64-apple-darwin
svm_target_platform: macosx-aarch64
platform: darwin
Expand Down Expand Up @@ -135,14 +135,11 @@ jobs:
target="${{ matrix.target }}"
flags=()
# TODO: default GHA runners run out of RAM when building with any debug info
flags+=(-j1)
# `keccak-asm` does not support MSVC or aarch64 Linux.
[[ "$target" != *msvc* && "$target" != "aarch64-unknown-linux-gnu" ]] && flags+=(--features=asm-keccak)
# Windows runs out of RAM when building binaries with LLVM
# [[ "$target" == *windows* ]] && flags+=(-j1)
[[ "$target" == *windows* ]] && flags+=(-j1)
[[ "$target" == *windows* ]] && exe=".exe"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
test:
name: test ${{ matrix.name }}
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.runner_label }}
timeout-minutes: 60
needs: matrices
strategy:
Expand Down
Loading