Compare commits

...

4 Commits

Author SHA1 Message Date
Johannes Altmanninger
0c7062def9 WIP cirrus: trigger after github action finishes
(TODO this is totally untested and mostly vibe coded.)

Whenever we push changes do docker/**, our docker images for Cirrus
CI will be rebuilt.

However, the Cirrus CI jobs will kick off at the same time as the
Docker builds, so they will likely use old images.  This can cause
surprising (albeit transient) failures.

Fix this by having Cirrus wait for GitHub Actions.

This addresses the second part of
https://github.com/fish-shell/fish-shell/pull/11884#discussion_r2423344925
2025-10-12 08:41:14 +02:00
Johannes Altmanninger
8a4a8bb6a0 cirrus: disable jammy-armv7-32bit for now
This fails with "exec format error" because our container is built
on a 64 bit system on GitHub Actions.  Not yet sure how to fix that.
2025-10-12 07:17:48 +02:00
David Adam
e1b064f6cc Bravely revert "CI: Disable some Cirrus CI jobs during RIIR transition"
This reverts what remains of commit
91be7489bc.

Closes #11871
Closes #11884
2025-10-12 07:17:48 +02:00
Johannes Altmanninger
68a8cd4501 cirrus.yml: switch back to org docker image paths
These should work now that we have (automatically-updated) docker
builds via .github/workflows/docker_builds.yml.

Ref: https://github.com/fish-shell/fish-shell/pull/11884#discussion_r2405536855
2025-10-12 07:17:48 +02:00
2 changed files with 50 additions and 10 deletions

View File

@@ -1,3 +1,5 @@
skip: $CIRRUS_REPO_OWNER == 'fish-shell' && $CIRRUS_BRANCH == 'master'
env: env:
CIRRUS_CLONE_DEPTH: 100 CIRRUS_CLONE_DEPTH: 100
CI: 1 CI: 1
@@ -6,12 +8,12 @@ linux_task:
matrix: matrix:
- name: alpine - name: alpine
container: &step container: &step
image: ghcr.io/krobelus/fish-ci/alpine:latest image: ghcr.io/fish-shell/fish-ci/alpine:latest
memory: 4GB memory: 4GB
- name: jammy - name: jammy
container: container:
<<: *step <<: *step
image: ghcr.io/krobelus/fish-ci/jammy:latest image: ghcr.io/fish-shell/fish-ci/jammy:latest
tests_script: tests_script:
# cirrus at times gives us 32 procs and 2 GB of RAM # cirrus at times gives us 32 procs and 2 GB of RAM
# Unrestriced parallelism results in OOM # Unrestriced parallelism results in OOM
@@ -28,9 +30,6 @@ linux_arm_task:
- name: focal-arm64 - name: focal-arm64
arm_container: arm_container:
image: ghcr.io/fish-shell/fish-ci/focal-arm64 image: ghcr.io/fish-shell/fish-ci/focal-arm64
- name: jammy-armv7-32bit
arm_container:
image: ghcr.io/fish-shell/fish-ci/jammy-armv7-32bit
tests_script: tests_script:
# cirrus at times gives us 32 procs and 2 GB of RAM # cirrus at times gives us 32 procs and 2 GB of RAM
# Unrestriced parallelism results in OOM # Unrestriced parallelism results in OOM
@@ -40,8 +39,7 @@ linux_arm_task:
- FISH_TEST_MAX_CONCURRENCY=6 cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug .. - FISH_TEST_MAX_CONCURRENCY=6 cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug ..
- ninja -j 6 fish - ninja -j 6 fish
- ninja fish_run_tests - ninja fish_run_tests
# CI task disabled during RIIR transition only_if: $CIRRUS_REPO_OWNER == 'fish-shell'
only_if: false && $CIRRUS_REPO_OWNER == 'fish-shell'
freebsd_task: freebsd_task:
matrix: matrix:

View File

@@ -4,8 +4,6 @@ on:
push: push:
branches: branches:
- master - master
paths:
- 'docker/**'
workflow_dispatch: workflow_dispatch:
concurrency: concurrency:
@@ -14,10 +12,26 @@ concurrency:
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
NAMESPACE: fish-ci NAMESPACE: fish-ci
ONLY_FOR_REPO_OWNER: fish-shell
jobs: jobs:
check-docker-changes:
if: github.repository_owner == env.ONLY_FOR_REPO_OWNER
runs-on: ubuntu-latest
outputs:
docker-changed: ${{ steps.changes.outputs.docker }}
steps:
- uses: actions/checkout@v5
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
docker:
- 'docker/**'
docker-build: docker-build:
if: github.repository_owner == 'fish-shell' needs: check-docker-changes
if: github.repository_owner == env.ONLY_FOR_REPO_OWNER && needs.check-docker-changes.outputs.docker-changed == 'true'
permissions: permissions:
contents: read contents: read
packages: write packages: write
@@ -82,3 +96,31 @@ jobs:
file: docker/${{ matrix.target }}.Dockerfile file: docker/${{ matrix.target }}.Dockerfile
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
trigger-cirrus:
needs: [check-docker-changes, docker-build]
if: always() && github.repository_owner == env.ONLY_FOR_REPO_OWNER
runs-on: ubuntu-latest
steps:
- name: Trigger Cirrus CI
env:
CIRRUS_TOKEN: ${{ secrets.CIRRUS_TOKEN }}
run: |
set -x
# N.B. push-triggered workflows are usually from master.
branch=${{ github.ref_name }}
repository_id=${{ github.repository_id }}
curl -X POST \
-H "Authorization: Bearer $CIRRUS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "mutation {
createBuild(input: {
repositoryId: \"$repository_id\",
branch: \"$branch\"
})
{ build { id } }
}"
}' \
https://api.cirrus-ci.com/graphql