From d107bbec1d26b9642f8a273051c08ff64a8ea997 Mon Sep 17 00:00:00 2001 From: Se7enZ Date: Sat, 7 Sep 2024 15:36:27 +0200 Subject: [PATCH] build: Repro build matrix strategy or focal, jammy and noble. --- .github/workflows/repro.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/repro.yml b/.github/workflows/repro.yml index 6d84fd31966a..900a059f0e50 100644 --- a/.github/workflows/repro.yml +++ b/.github/workflows/repro.yml @@ -5,22 +5,29 @@ on: # 05:00 Berlin, 03:00 UTC, 23:00 New York, 20:00 Los Angeles schedule: - cron: "0 3 * * *" + # TODO: remove after testing + push: + branches: + - 7117-repro-nightly-builds jobs: - ubuntu-noble: - name: Ubuntu Noble Repro build + ubuntu: + name: Ubuntu Repro build: ${{ matrix.version }} runs-on: ubuntu-22.04 + strategy: + matrix: + version: ['focal', 'jammy', 'noble'] steps: - name: Git checkout uses: actions/checkout@v2 - name: Build environment setup run: | - echo "Building base image for noble" - docker run --rm -v $(pwd):/build ubuntu:noble bash -c "apt-get update && apt-get install -y debootstrap && debootstrap noble /build/noble" - tar -C noble -c . | docker import - noble + echo "Building base image for ${{ matrix.version }}" + docker run --rm -v $(pwd):/build ubuntu:${{ matrix.version }} bash -c "apt-get update && apt-get install -y debootstrap && debootstrap ${{ matrix.version }} /build/${{ matrix.version }}" + tar -C ${{ matrix.version }} -c . | docker import - ${{ matrix.version }} - name: Builder image setup - run: docker build -t cl-repro-noble - < contrib/reprobuild/Dockerfile.noble + run: docker build -t cl-repro-${{ matrix.version }} - < contrib/reprobuild/Dockerfile.${{ matrix.version }} - name: Create release directory run: mkdir $GITHUB_WORKSPACE/release @@ -28,7 +35,7 @@ jobs: - name: Build using the builder image and store Git state. run: | # Perform the repro build. - docker run --name cl-build -v $GITHUB_WORKSPACE:/repo -e FORCE_MTIME=$(date +%F) -t cl-repro-noble + docker run --name cl-build -v $GITHUB_WORKSPACE:/repo -e FORCE_MTIME=$(date +%F) -t cl-repro-${{ matrix.version }} # Commit the image and use it to inspect the Git tree state. docker commit cl-build cl-release @@ -36,7 +43,7 @@ jobs: docker run --rm -v $GITHUB_WORKSPACE:/repo -t cl-release git diff > release/git-diff.txt # Change permissions on the release files for access by build environment. - docker run --rm -v $GITHUB_WORKSPACE:/repo -t cl-repro-noble chmod -R 777 /repo/release + docker run --rm -v $GITHUB_WORKSPACE:/repo -t cl-repro-${{ matrix.version }} chmod -R 777 /repo/release - name: Assert clean release run: |