Skip to content

Commit

Permalink
hof/ci: disable macos builds for about a week (#277)
Browse files Browse the repository at this point in the history
  • Loading branch information
verdverm authored Aug 25, 2023
1 parent 0cb49ca commit f378b6f
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 56 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/dagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@ jobs:
echo "HOF_TAG=${TAG}" >> $GITHUB_ENV
- name: Fetch Go deps
run: go mod download
- name: Set up Docker
uses: crazy-max/ghaction-setup-docker@v1
with:
version: v23.0.1
if: ${{ startsWith( runner.os, 'macos') }}
- name: Setup Docker MacOS var
run: echo "DOCKER_HOST="unix://$HOME/.colima/default/docker.sock"" >> $GITHUB_ENV
if: ${{ startsWith( runner.os, 'macos') }}
- name: Test Compatibility
run: |-
docker version
Expand Down Expand Up @@ -94,14 +86,6 @@ jobs:
echo "HOF_TAG=${TAG}" >> $GITHUB_ENV
- name: Fetch Go deps
run: go mod download
- name: Set up Docker
uses: crazy-max/ghaction-setup-docker@v1
with:
version: v23.0.1
if: ${{ startsWith( runner.os, 'macos') }}
- name: Setup Docker MacOS var
run: echo "DOCKER_HOST="unix://$HOME/.colima/default/docker.sock"" >> $GITHUB_ENV
if: ${{ startsWith( runner.os, 'macos') }}
- name: Test Compatibility
run: |-
docker version
Expand Down
22 changes: 8 additions & 14 deletions .github/workflows/hof.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
- 1.21.x
os:
- ubuntu-latest
- macos-latest
environment: hof mod testing
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -46,27 +45,22 @@ jobs:
fi
echo "HOF_SHA=${SHA}" >> $GITHUB_ENV
echo "HOF_TAG=${TAG}" >> $GITHUB_ENV
- name: Fetch Go deps
run: go mod download
- name: Build CLI
run: go install ./cmd/hof
- name: Update QEMU on MacOS
run: brew reinstall -f --force-bottle qemu
if: ${{ startsWith( runner.os, 'macos') }}
- name: Set up Docker
uses: crazy-max/ghaction-setup-docker@v1
with:
version: v23.0.1
- name: Setup Docker on MacOS
run: "brew install docker\nbrew reinstall -f --force-bottle qemu lima colima \ncolima start debug --cpu 3 --memory 10 --disk 12"
if: ${{ startsWith( runner.os, 'macos') }}
- name: Setup Docker MacOS var
run: echo "DOCKER_HOST="unix://$HOME/.colima/default/docker.sock"" >> $GITHUB_ENV
- name: Setup MacOS docker socket
run: echo "DOCKER_HOST="unix:///var/run/docker.sock"" >> $GITHUB_ENV
if: ${{ startsWith( runner.os, 'macos') }}
- name: Test Compatibility
run: |-
docker version
docker info
docker context ls
go run test/docker/main.go
- name: Fetch Go deps
run: go mod download
- name: Build CLI
run: go install ./cmd/hof
- name: Build Formatters
run: |-
make formatters
Expand Down
29 changes: 13 additions & 16 deletions ci/gha/common/steps.cue
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,12 @@ Steps: {
}
macos: {
name: "Set up Docker Colima"
// colima settings based on github default macos worker
run: """
brew install docker colima
colima start --cpu 1 --memory 2 --disk 10
brew reinstall -f --force-bottle qemu lima colima docker
limactl info
colime delete
colima start debug --cpu 3 --memory 10 --disk 12
"""
}
}
Expand Down Expand Up @@ -130,26 +133,20 @@ Steps: {
}

docker: {
setup: {
name: "Set up Docker"
uses: "crazy-max/ghaction-setup-docker@v1"
with: {
version: "v23.0.1"
}
"if": "${{ startsWith( runner.os, 'macos') }}"
}
machack: {
name: "Update QEMU on MacOS"
macSetup: {
name: "Setup Docker on MacOS"
run: """
brew reinstall -f --force-bottle qemu
brew install docker
brew reinstall -f --force-bottle qemu lima colima
colima start debug --cpu 3 --memory 10 --disk 12
"""
"if": "${{ startsWith( runner.os, 'macos') }}"
}

macos: {
name: "Setup Docker MacOS var"
macSocket: {
name: "Setup MacOS docker socket"
run: """
echo "DOCKER_HOST=\"unix://$HOME/.colima/default/docker.sock\"" >> $GITHUB_ENV
echo "DOCKER_HOST=\"unix:///var/run/docker.sock\"" >> $GITHUB_ENV
"""
"if": "${{ startsWith( runner.os, 'macos') }}"
}
Expand Down
2 changes: 1 addition & 1 deletion ci/gha/common/vars.cue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Formatters: [
]

Versions: {
docker: "23.0.1"
docker: "24.0.5"
go: "1.21.x" | ["1.20.x", "1.21.x"]
os: "ubuntu-latest" | ["ubuntu-latest", "macos-latest"]
}
4 changes: 0 additions & 4 deletions ci/gha/dagger.cue
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ ghacue.#Workflow & {
common.Steps.checkout,
common.Steps.vars,
common.Steps.go.deps,
common.Steps.docker.setup,
common.Steps.docker.macos,
common.Steps.docker.compat,

{
Expand Down Expand Up @@ -55,8 +53,6 @@ ghacue.#Workflow & {
common.Steps.checkout,
common.Steps.vars,
common.Steps.go.deps,
common.Steps.docker.setup,
common.Steps.docker.macos,
common.Steps.docker.compat,

{
Expand Down
13 changes: 8 additions & 5 deletions ci/gha/hof.cue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ ghacue.#Workflow & {
"fail-fast": false
matrix: {
"go": [...] & common.Versions.go
os: [...] & common.Versions.os
// os: [...] & common.Versions.os
os: ["ubuntu-latest"]
}
}
environment: "hof mod testing"
Expand All @@ -29,15 +30,17 @@ ghacue.#Workflow & {
common.Steps.go.cache,
common.Steps.checkout,
common.Steps.vars,

common.Steps.docker.macSetup,
common.Steps.docker.macSocket,
common.Steps.docker.compat,

// application steps
common.Steps.go.deps,
{
name: "Build CLI"
run: "go install ./cmd/hof"
},
common.Steps.docker.machack,
common.Steps.docker.setup,
common.Steps.docker.macos,
common.Steps.docker.compat,
{
name: "Build Formatters"
run: """
Expand Down

0 comments on commit f378b6f

Please sign in to comment.