Skip to content

Commit

Permalink
ci: refactor platform specific GHA CI (#471)
Browse files Browse the repository at this point in the history
* ci: add macOS ARM to install dependencies GHA CI job

Signed-off-by: Austin Vazquez <[email protected]>

* ci: refactor platform specific GHA CI

This change refactors existing CI into platform specific CI so macOS
tests do not run on Windows-only changes and vice-versa.

Signed-off-by: Austin Vazquez <[email protected]>

---------

Signed-off-by: Austin Vazquez <[email protected]>
  • Loading branch information
austinvazquez authored Dec 27, 2024
1 parent 76c9fe2 commit 016abfe
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/ci.yaml → .github/workflows/macos-ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: macOS CI
on:
push:
branches:
Expand All @@ -9,10 +9,14 @@ on:
pull_request:
branches:
- main
paths-ignore:
- "**.md"
- "contrib/**"
- "Dockerfile"
paths:
- .github/workflows/macos-ci.yaml
- deps/full-os.conf
- deps/lima.conf
- e2e/**
- lima-template/**
- Makefile
- Makefile.darwin
workflow_dispatch:

concurrency:
Expand All @@ -21,14 +25,14 @@ concurrency:

jobs:
install-dependencies:
# This is a spot check for make install.dependencies on macOS and Windows platforms.
# This is a spot check for make install.dependencies on macOS x86/ARM platforms.
# Finch-core provides the core dependencies needed to run Finch such as the base OS
# image, rootfs, and Lima bundle. Validate the mechanism used to install the core
# dependencies works on the respective platforms.
# dependencies works on macOS.
strategy:
fail-fast: false
matrix:
os: [macos-13, windows-2022]
os: [macos-13, macos-13-xlarge]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/windows-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Windows CI
on:
push:
branches:
- main
paths-ignore:
- "**.md"
- "src/**"
pull_request:
branches:
- main
paths:
- .github/workflows/windows-ci.yaml
- deps/rootfs.conf
- Makefile
- Makefile.windows
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
install-dependencies:
# This is a spot check for make install.dependencies on Windows platform.
# Finch-core provides the core dependencies needed to run Finch such as the base OS
# image, rootfs, and Lima bundle. Validate the mechanism used to install the core
# dependencies works on Windows.
strategy:
fail-fast: false
matrix:
os: [windows-2022]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
persist-credentials: false
submodules: true
- name: Setup go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version-file: e2e/go.mod
cache-dependency-path: e2e/go.sum
- name: Install platform dependencies
run: make install.dependencies
- name: Clean up dependencies
run: make clean

0 comments on commit 016abfe

Please sign in to comment.