From 280d6bf3130bb3555f6e9bb638686769d06b1068 Mon Sep 17 00:00:00 2001 From: Henry Wallace Date: Mon, 27 Jan 2025 11:19:30 -0500 Subject: [PATCH] Update workflows to build on ubuntu --- .github/workflows/CDImage.yml | 4 +++ .github/workflows/CIBuild.yml | 10 +++--- .github/workflows/CoreDevelopTest.yml | 49 +++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/CoreDevelopTest.yml diff --git a/.github/workflows/CDImage.yml b/.github/workflows/CDImage.yml index 10d3aa7..58b821f 100644 --- a/.github/workflows/CDImage.yml +++ b/.github/workflows/CDImage.yml @@ -24,6 +24,10 @@ jobs: - os: alma9 file: doc/MaCh3DockerFiles/Alma9/Dockerfile tag_latest: alma9latest + - os: Ubuntu22.04 + file: doc/MaCh3DockerFiles/Ubuntu22.04/Dockerfile + tag: ubuntulatest + name: Image CD ${{ matrix.os }} diff --git a/.github/workflows/CIBuild.yml b/.github/workflows/CIBuild.yml index 69c9197..bab9f2b 100644 --- a/.github/workflows/CIBuild.yml +++ b/.github/workflows/CIBuild.yml @@ -6,8 +6,8 @@ name: Build CI # The events that trigger the workflow on: pull_request: - branches: [ develop ] - + branches: [ develop ] + permissions: contents: read packages: write @@ -22,9 +22,9 @@ jobs: - os: Alma9 file: doc/MaCh3DockerFiles/Alma9/Dockerfile tag: alma9latest - # - os: Rocky9 - # file: doc/MaCh3DockerFiles/Rocky9/Dockerfile - # tag: rocky9latest + - os: Ubuntu22.04 + file: doc/MaCh3DockerFiles/Ubuntu22.04/Dockerfile + tag: ubuntulatest name: Build CI ${{ matrix.os }} diff --git a/.github/workflows/CoreDevelopTest.yml b/.github/workflows/CoreDevelopTest.yml new file mode 100644 index 0000000..1e039aa --- /dev/null +++ b/.github/workflows/CoreDevelopTest.yml @@ -0,0 +1,49 @@ +# Runs weekly build against develop idea is to give us +# a reasonable warning when DUNE develop and core +# are incompatible! Also pushes container for easy testing + +name: Weekly Core Integration + +on: + schedule: + - cron: '0 0 * * 0' # Might as well do everything Sunday at midngiht + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false # KS: Prevents cancellation of remaining jobs if one fails + matrix: + include: + - os: alma9 + file: doc/MaCh3DockerFiles/Alma9/Dockerfile + tag_latest: alma9latest + + name: Image CD ${{ matrix.os }} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Log in to GitHub Container Registry + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + + - name: Build Docker image + run: | + docker build . \ + --file "${{ matrix.file }}" \ + --tag "ghcr.io/dune/mach3:${{ matrix.tag_latest }}_core_develop" \ + --build-arg MACH3_DUNE_VERSION="develop" \ + --build-arg MACH3_CORE_VERSION=develop + + - name: Push Docker image + run: | + docker push "ghcr.io/dune/mach3:${{ matrix.tag_latest }}_core_develop" + xw + - name: Delete old images + uses: actions/delete-package-versions@v5 + with: + package-name: 'mach3' + package-type: 'container' + min-versions-to-keep: 5 + delete-only-untagged-versions: 'true' \ No newline at end of file