From 67b39a34b0100ea699931087e3468659df731059 Mon Sep 17 00:00:00 2001 From: TG Date: Mon, 24 Mar 2025 23:39:32 +0100 Subject: [PATCH 01/12] chore: add linux-arm.yml workflow for Linux ARM builds This commit introduces a new GitHub Actions workflow file (linux-arm.yml) for building and testing Servo on an ARM runner (ubuntu-24.04-arm). The workflow sets up the environment, builds Servo using an ARM target, and runs unit tests and bencher jobs when enabled. Note that WPT tests are omitted for ARM as specified. Signed-off-by: TG --- .github/workflows/linux-arm.yml | 62 +++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/linux-arm.yml diff --git a/.github/workflows/linux-arm.yml b/.github/workflows/linux-arm.yml new file mode 100644 index 00000000000..8b6c7396328 --- /dev/null +++ b/.github/workflows/linux-arm.yml @@ -0,0 +1,62 @@ +name: Linux Arm Build and Test + +on: + workflow_call: + inputs: + profile: + required: true + type: string + unit-tests: + required: true + type: boolean + build-libservo: + required: true + type: boolean + bencher: + required: true + type: boolean + + +jobs: + linux-arm: + name: Linux Arm + runs-on: ubuntu-24.04-arm + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Setup Python + uses: ./.github/actions/setup-python + + - name: Setup Rust Toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + + - name: Bootstrap Dependencies + run: | + sudo apt update + ./mach bootstrap --skip-lints + + - name: Build libservo for ARM + run: | + # Build for ARM using the appropriate target + ./mach build --release --target=aarch64-unknown-linux-gnu + + - name: Run Unit Tests + if: ${{ inputs.unit-tests }} + run: | + ./mach test-unit --release --target=aarch64-unknown-linux-gnu + + - name: Build libservo with examples + if: ${{ inputs.build-libservo }} + run: cargo build --target=aarch64-unknown-linux-gnu -p libservo --all-targets + + - name: Run Bencher + if: ${{ inputs.bencher }} + run: | + # Replace with the command to run your bencher tests + ./mach test-bencher --release -- target=aarch64-unknown-linux-gnu From 1d27dd3f806ee1c1bf60ffb3090a536899a271ad Mon Sep 17 00:00:00 2001 From: TG Date: Mon, 24 Mar 2025 23:40:31 +0100 Subject: [PATCH 02/12] chore: add linux-arm job to dispatch-workflow.yml This commit updates dispatch-workflow.yml to include a new job entry for Linux ARM. When the matrix contains linux-arm as the workflow, it now triggers the linux-arm.yml workflow. This change allows ARM builds to be dispatched as part of the CI pipeline. Signed-off-by: TG --- .github/workflows/dispatch-workflow.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/dispatch-workflow.yml b/.github/workflows/dispatch-workflow.yml index 8688b96d76c..13b626bf194 100644 --- a/.github/workflows/dispatch-workflow.yml +++ b/.github/workflows/dispatch-workflow.yml @@ -85,3 +85,16 @@ jobs: with: profile: ${{ inputs.profile }} bencher: ${{ inputs.bencher }} + + linux-arm: + if: ${{ inputs.workflow == 'linux-arm' }} + name: Linux ARM + uses: ./.github/workflows/linux-arm.yml + secrets: inherit + with: + profile: ${{ inputs.profile }} + unit-tests: ${{ inputs.unit-tests }} + build-libservo: ${{ inputs.build-libservo }} + bencher: ${{ inputs.bencher }} + + From 4f054559bfee210fbb88547bd483ea70205b0bcd Mon Sep 17 00:00:00 2001 From: TG Date: Mon, 24 Mar 2025 23:41:55 +0100 Subject: [PATCH 03/12] feat(try-parser): add linux-arm support to try_parser.py Extend try_parser.py to recognize the "linux-arm" keyword. When detected, it now returns a JobConfig with the workflow set to "linux-arm" and an updated name ("Linux ARM"). This ensures that the generated matrix includes an ARM job when requested. Signed-off-by: TG --- python/servo/try_parser.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/python/servo/try_parser.py b/python/servo/try_parser.py index 04691a83d0c..676ea629717 100644 --- a/python/servo/try_parser.py +++ b/python/servo/try_parser.py @@ -45,6 +45,7 @@ class Workflow(str, Enum): ANDROID = "android" OHOS = "ohos" LINT = "lint" + LINUX_ARM = "linux-arm" @dataclass @@ -78,6 +79,8 @@ class JobConfig(object): def update_name(self): if self.workflow is Workflow.LINUX: self.name = "Linux" + elif self.workflow is Workflow.LINUX_ARM: + self.name = "Linux ARM" elif self.workflow is Workflow.MACOS: self.name = "MacOS" elif self.workflow is Workflow.WINDOWS: @@ -104,7 +107,9 @@ class JobConfig(object): def handle_preset(s: str) -> Optional[JobConfig]: s = s.lower() - if any(word in s for word in ["linux"]): + if any(word in s for word in ["linux-arm", "arm"]): + return JobConfig("Linux ARM", Workflow.LINUX_ARM) + elif any(word in s for word in ["linux"]): return JobConfig("Linux", Workflow.LINUX) elif any(word in s for word in ["mac", "macos"]): return JobConfig("MacOS", Workflow.MACOS) @@ -122,6 +127,8 @@ def handle_preset(s: str) -> Optional[JobConfig]: unit_tests=False) # production profile does not work with unit-tests elif any(word in s for word in ["lint", "tidy"]): return JobConfig("Lint", Workflow.LINT) + elif any(word in s for word in ["linux-arm", "arm"]): + return JobConfig("Linux ARM", Workflow.LINUX_ARM) else: return None From 284f1e31b158fe88e1acd002d714341773af0516 Mon Sep 17 00:00:00 2001 From: TG Date: Tue, 25 Mar 2025 00:26:27 +0100 Subject: [PATCH 04/12] Dummy change, will revert later Signed-off-by: TG --- .github/workflows/dispatch-workflow.yml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/dispatch-workflow.yml b/.github/workflows/dispatch-workflow.yml index 13b626bf194..6024b4f55f1 100644 --- a/.github/workflows/dispatch-workflow.yml +++ b/.github/workflows/dispatch-workflow.yml @@ -86,15 +86,13 @@ jobs: profile: ${{ inputs.profile }} bencher: ${{ inputs.bencher }} - linux-arm: - if: ${{ inputs.workflow == 'linux-arm' }} - name: Linux ARM - uses: ./.github/workflows/linux-arm.yml - secrets: inherit - with: - profile: ${{ inputs.profile }} - unit-tests: ${{ inputs.unit-tests }} - build-libservo: ${{ inputs.build-libservo }} - bencher: ${{ inputs.bencher }} - - + #linux-arm: + #if: ${{ inputs.workflow == 'linux-arm' }} + #name: Linux ARM + #uses: ./.github/workflows/linux-arm.yml + #secrets: inherit + #with: + #profile: ${{ inputs.profile }} + #unit-tests: ${{ inputs.unit-tests }} + #build-libservo: ${{ inputs.build-libservo }} + # bencher: ${{ inputs.bencher }} From bce28c924abb7c3fb584bac7281244bdec60104f Mon Sep 17 00:00:00 2001 From: TG Date: Tue, 25 Mar 2025 11:00:48 +0100 Subject: [PATCH 05/12] reverting dummy change Signed-off-by: TG --- .github/workflows/dispatch-workflow.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/dispatch-workflow.yml b/.github/workflows/dispatch-workflow.yml index 6024b4f55f1..3654f72b5a6 100644 --- a/.github/workflows/dispatch-workflow.yml +++ b/.github/workflows/dispatch-workflow.yml @@ -86,13 +86,13 @@ jobs: profile: ${{ inputs.profile }} bencher: ${{ inputs.bencher }} - #linux-arm: - #if: ${{ inputs.workflow == 'linux-arm' }} - #name: Linux ARM - #uses: ./.github/workflows/linux-arm.yml - #secrets: inherit - #with: - #profile: ${{ inputs.profile }} - #unit-tests: ${{ inputs.unit-tests }} - #build-libservo: ${{ inputs.build-libservo }} - # bencher: ${{ inputs.bencher }} + linux-arm: + if: ${{ inputs.workflow == 'linux-arm' }} + name: Linux ARM + uses: ./.github/workflows/linux-arm.yml + secrets: inherit + with: + profile: ${{ inputs.profile }} + unit-tests: ${{ inputs.unit-tests }} + build-libservo: ${{ inputs.build-libservo }} + bencher: ${{ inputs.bencher }} From 91e065ec6fd39956b99840f14fb83eb84ed000ff Mon Sep 17 00:00:00 2001 From: TG Date: Tue, 25 Mar 2025 13:20:16 +0100 Subject: [PATCH 06/12] Remove duplicate check on linux-arm Signed-off-by: TG --- python/servo/try_parser.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/python/servo/try_parser.py b/python/servo/try_parser.py index 676ea629717..0a3ed69023f 100644 --- a/python/servo/try_parser.py +++ b/python/servo/try_parser.py @@ -127,8 +127,6 @@ def handle_preset(s: str) -> Optional[JobConfig]: unit_tests=False) # production profile does not work with unit-tests elif any(word in s for word in ["lint", "tidy"]): return JobConfig("Lint", Workflow.LINT) - elif any(word in s for word in ["linux-arm", "arm"]): - return JobConfig("Linux ARM", Workflow.LINUX_ARM) else: return None From 55bab017051aa779c8c6248bd72c50aa7b11cb54 Mon Sep 17 00:00:00 2001 From: TG Date: Tue, 25 Mar 2025 16:18:57 +0100 Subject: [PATCH 07/12] Remove linux arm in dispatch workflow Signed-off-by: TG --- .github/workflows/dispatch-workflow.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/dispatch-workflow.yml b/.github/workflows/dispatch-workflow.yml index 3654f72b5a6..8688b96d76c 100644 --- a/.github/workflows/dispatch-workflow.yml +++ b/.github/workflows/dispatch-workflow.yml @@ -85,14 +85,3 @@ jobs: with: profile: ${{ inputs.profile }} bencher: ${{ inputs.bencher }} - - linux-arm: - if: ${{ inputs.workflow == 'linux-arm' }} - name: Linux ARM - uses: ./.github/workflows/linux-arm.yml - secrets: inherit - with: - profile: ${{ inputs.profile }} - unit-tests: ${{ inputs.unit-tests }} - build-libservo: ${{ inputs.build-libservo }} - bencher: ${{ inputs.bencher }} From 17b2d826040acba431d75ee0db7a423c35a7666e Mon Sep 17 00:00:00 2001 From: TG Date: Tue, 25 Mar 2025 16:57:36 +0100 Subject: [PATCH 08/12] Change logic on linux-arm check Signed-off-by: TG --- python/servo/try_parser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/servo/try_parser.py b/python/servo/try_parser.py index 0a3ed69023f..b9261a8dae3 100644 --- a/python/servo/try_parser.py +++ b/python/servo/try_parser.py @@ -107,7 +107,9 @@ class JobConfig(object): def handle_preset(s: str) -> Optional[JobConfig]: s = s.lower() - if any(word in s for word in ["linux-arm", "arm"]): + if s == "linux-arm": + return JobConfig("Linux ARM", Workflow.LINUX_ARM) + elif any(word in s for word in ["arm"]): return JobConfig("Linux ARM", Workflow.LINUX_ARM) elif any(word in s for word in ["linux"]): return JobConfig("Linux", Workflow.LINUX) From 444e3012e8ad6e247f157eba61bd56d326cd0738 Mon Sep 17 00:00:00 2001 From: TG Date: Tue, 25 Mar 2025 17:18:20 +0100 Subject: [PATCH 09/12] Add linux-arm to dispatch workflow Signed-off-by: TG --- .github/workflows/dispatch-workflow.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/dispatch-workflow.yml b/.github/workflows/dispatch-workflow.yml index 8688b96d76c..6e27ad039c6 100644 --- a/.github/workflows/dispatch-workflow.yml +++ b/.github/workflows/dispatch-workflow.yml @@ -85,3 +85,14 @@ jobs: with: profile: ${{ inputs.profile }} bencher: ${{ inputs.bencher }} + + linux-arm: + if: ${{ inputs.workflow == 'linux-arm' }} + name: Linux ARM + uses: ./.github/workflows/linux-arm.yml + secrets: inherit + with: + profile: ${{ inputs.profile }} + unit-tests: ${{ inputs.unit-tests }} + build-libservo: ${{ inputs.unit-tests }} + bencher: ${{ inputs.bencher }} From 080132af5d2256774b092e4364bdc29df220d5f5 Mon Sep 17 00:00:00 2001 From: TG Date: Wed, 26 Mar 2025 06:07:15 +0100 Subject: [PATCH 10/12] chore: remove linux-arm from dispatch and add workflow_dispatch trigger Signed-off-by: TG --- .github/workflows/dispatch-workflow.yml | 11 ----------- .github/workflows/linux-arm.yml | 18 +++++++++++++++--- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/dispatch-workflow.yml b/.github/workflows/dispatch-workflow.yml index 6e27ad039c6..8688b96d76c 100644 --- a/.github/workflows/dispatch-workflow.yml +++ b/.github/workflows/dispatch-workflow.yml @@ -85,14 +85,3 @@ jobs: with: profile: ${{ inputs.profile }} bencher: ${{ inputs.bencher }} - - linux-arm: - if: ${{ inputs.workflow == 'linux-arm' }} - name: Linux ARM - uses: ./.github/workflows/linux-arm.yml - secrets: inherit - with: - profile: ${{ inputs.profile }} - unit-tests: ${{ inputs.unit-tests }} - build-libservo: ${{ inputs.unit-tests }} - bencher: ${{ inputs.bencher }} diff --git a/.github/workflows/linux-arm.yml b/.github/workflows/linux-arm.yml index 8b6c7396328..1ba219614cb 100644 --- a/.github/workflows/linux-arm.yml +++ b/.github/workflows/linux-arm.yml @@ -15,13 +15,26 @@ on: bencher: required: true type: boolean - + workflow_dispatch: + inputs: + profile: + required: true + type: string + unit-tests: + required: true + type: boolean + build-libservo: + required: true + type: boolean + bencher: + required: true + type: boolean jobs: linux-arm: name: Linux Arm runs-on: ubuntu-24.04-arm - steps: + steps:i - name: Checkout repository uses: actions/checkout@v4 with: @@ -58,5 +71,4 @@ jobs: - name: Run Bencher if: ${{ inputs.bencher }} run: | - # Replace with the command to run your bencher tests ./mach test-bencher --release -- target=aarch64-unknown-linux-gnu From 97cb35a718be4ca24a5aa0662b945b142472f9a5 Mon Sep 17 00:00:00 2001 From: TG Date: Wed, 26 Mar 2025 06:39:12 +0100 Subject: [PATCH 11/12] fix syntax error Signed-off-by: TG --- .github/workflows/linux-arm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux-arm.yml b/.github/workflows/linux-arm.yml index 1ba219614cb..ec7fb11c0ee 100644 --- a/.github/workflows/linux-arm.yml +++ b/.github/workflows/linux-arm.yml @@ -34,7 +34,7 @@ jobs: linux-arm: name: Linux Arm runs-on: ubuntu-24.04-arm - steps:i + steps: - name: Checkout repository uses: actions/checkout@v4 with: From b63d21af5c83af4cc50649fe4da4a9cf13e8b211 Mon Sep 17 00:00:00 2001 From: sagudev <16504129+sagudev@users.noreply.github.com> Date: Tue, 1 Apr 2025 14:27:40 +0200 Subject: [PATCH 12/12] Update python/servo/try_parser.py Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --- python/servo/try_parser.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/python/servo/try_parser.py b/python/servo/try_parser.py index b9261a8dae3..a4521996919 100644 --- a/python/servo/try_parser.py +++ b/python/servo/try_parser.py @@ -107,9 +107,7 @@ class JobConfig(object): def handle_preset(s: str) -> Optional[JobConfig]: s = s.lower() - if s == "linux-arm": - return JobConfig("Linux ARM", Workflow.LINUX_ARM) - elif any(word in s for word in ["arm"]): + if s == "linux-arm" or any(word in s for word in ["arm"]): return JobConfig("Linux ARM", Workflow.LINUX_ARM) elif any(word in s for word in ["linux"]): return JobConfig("Linux", Workflow.LINUX)