From dd3c87092e72baf6ef4a4b199a74855cef1298b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Skrzy=C5=84ski?= Date: Tue, 25 Jul 2023 10:49:58 +0200 Subject: [PATCH 01/11] Run kokkos tests before pushing the updated image --- .../continuous-integration-workflow.yml | 65 +++++++++++++------ fedora | 2 +- 2 files changed, 47 insertions(+), 20 deletions(-) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index f135258..2cd083c 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -11,22 +11,23 @@ on: jobs: CI: - continue-on-error: ${{ matrix.config.continue-on-error == 'true' }} strategy: - matrix: - config: - - {dockerfile: 'fedora', tag: 'latest'} - - {dockerfile: 'fedora', tag: 'rawhide', build_args: 'TAG=rawhide', continue-on-error: 'true'} - - {dockerfile: 'ubuntu', tag: 'latest'} - - {dockerfile: 'ubuntu', tag: 'rolling', build_args: 'TAG=rolling'} - - {dockerfile: 'ubuntu', tag: 'devel', build_args: 'TAG=devel', continue-on-error: 'true'} - - {dockerfile: 'ubuntu', tag: 'intel', build_args: 'TAG=22.04,INTEL=yes', continue-on-error: 'true'} - - {dockerfile: 'opensuse', tag: 'latest'} - - {dockerfile: 'fedora', tag: 'intel', build_args: 'TAG=37,INTEL=yes', continue-on-error: 'true'} + matrix: + config: + - {dockerfile: 'fedora', tag: 'latest'} + - {dockerfile: 'fedora', tag: 'rawhide', build_args: 'TAG=rawhide', continue-on-error: 'true'} + - {dockerfile: 'ubuntu', tag: 'latest'} + - {dockerfile: 'ubuntu', tag: 'rolling', build_args: 'TAG=rolling'} + - {dockerfile: 'ubuntu', tag: 'devel', build_args: 'TAG=devel', continue-on-error: 'true'} + - {dockerfile: 'ubuntu', tag: 'intel', build_args: 'TAG=22.04,INTEL=yes', continue-on-error: 'true'} + - {dockerfile: 'opensuse', tag: 'latest'} + - {dockerfile: 'fedora', tag: 'intel', build_args: 'TAG=38,INTEL=yes', cmake_args: '-DCMAKE_CXX_COMPILER=icpc', continue-on-error: 'true'} + - {dockerfile: 'fedora', tag: 'intel', build_args: 'TAG=38,INTEL=yes', cmake_args: '-DCMAKE_CXX_COMPILER=icpx -DCMAKE_CXX_FLAGS=-fp-model=precise', continue-on-error: 'true'} + continue-on-error: ${{ matrix.config.continue-on-error == 'true' }} + env: + docker-tag: ghcr.io/kokkos/ci-containers/${{ matrix.config.dockerfile }}:${{ matrix.config.tag }} runs-on: ubuntu-latest steps: - - name: Checkout out code - uses: actions/checkout@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Login to Github Container Registry @@ -35,18 +36,44 @@ jobs: with: registry: ghcr.io username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Convert build_args id: build_args run: | - echo "args<> $GITHUB_OUTPUT + echo "args<> $GITHUB_OUTPUT echo ${{ matrix.config.build_args }} | sed 's/,/\n/' >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT - - name: Build and Push Docker images for Github Container Registry - uses: docker/build-push-action@v3 + - name: Build new image and Load it into Docker for testing + uses: docker/build-push-action@v4 with: - tags: ghcr.io/kokkos/ci-containers/${{ matrix.config.dockerfile }}:${{ matrix.config.tag }} + tags: ${{ env.docker-tag }} file: ${{ matrix.config.dockerfile }} build-args: ${{ steps.build_args.outputs.args }} pull: true - push: ${{ github.repository_owner == 'kokkos' && ( github.event_name == 'push' || github.event_name == 'schedule' ) }} + load: true + - name: Checkout kokkos + uses: actions/checkout@v3 + with: + repository: kokkos/kokkos + path: kokkos + - name: Build and Test Kokkos using updated image + run: | + docker run -t --rm -v ${{ github.workspace }}/kokkos:/kokkos -w /kokkos ${{ env.docker-tag }} \ + sh -c \ + "cmake -B builddir \ + ${{ matrix.config.cmake_args }} \ + -DKokkos_ENABLE_HWLOC=ON \ + -DKokkos_ENABLE_BENCHMARKS=ON \ + -DKokkos_ENABLE_EXAMPLES=ON \ + -DKokkos_ENABLE_TESTS=ON \ + -DKokkos_ENABLE_SERIAL=ON \ + -DKokkos_ENABLE_OPENMP=ON && \ + cmake --build builddir --parallel 2 && \ + ctest --test-dir builddir --output-on-failure" + - name: Push the image into Github Container Registry + uses: docker/build-push-action@v4 + if: ${{ github.repository_owner == 'kokkos' && ( github.event_name == 'push' || github.event_name == 'schedule' ) }} + with: + tags: ${{ env.docker-tag }} + file: ${{ matrix.config.dockerfile }} + push: true diff --git a/fedora b/fedora index 70beb3c..7c9667a 100644 --- a/fedora +++ b/fedora @@ -11,7 +11,7 @@ RUN ( dnf -y update || dnf -y update ) && \ RUN if [ "${INTEL}" = "yes" ]; then \ printf "[oneAPI]\nname=Intel oneAPI\nbaseurl=https://yum.repos.intel.com/oneapi\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB" > /etc/yum.repos.d/intel-oneapi.repo && \ dnf -y update && \ - dnf -y install intel-oneapi-compiler-dpcpp-cpp intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic intel-oneapi-mkl-devel && \ + dnf -y install intel-oneapi-compiler-dpcpp-cpp intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic && \ dnf clean all; \ fi From f69210215e3e142d4ee1b729525afcdd5dabe6a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Skrzy=C5=84ski?= Date: Fri, 17 Nov 2023 19:14:36 +0100 Subject: [PATCH 02/11] Use correct kokkos branch --- .github/workflows/continuous-integration-workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 2cd083c..267c1fa 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -55,6 +55,7 @@ jobs: uses: actions/checkout@v3 with: repository: kokkos/kokkos + ref: develop path: kokkos - name: Build and Test Kokkos using updated image run: | From 8a2ceead139049fded7c5a02dc709ec48ce6e118 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Fri, 17 Nov 2023 16:35:35 -0700 Subject: [PATCH 03/11] Update .github/workflows/continuous-integration-workflow.yml --- .github/workflows/continuous-integration-workflow.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 267c1fa..dbe0995 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -21,7 +21,6 @@ jobs: - {dockerfile: 'ubuntu', tag: 'devel', build_args: 'TAG=devel', continue-on-error: 'true'} - {dockerfile: 'ubuntu', tag: 'intel', build_args: 'TAG=22.04,INTEL=yes', continue-on-error: 'true'} - {dockerfile: 'opensuse', tag: 'latest'} - - {dockerfile: 'fedora', tag: 'intel', build_args: 'TAG=38,INTEL=yes', cmake_args: '-DCMAKE_CXX_COMPILER=icpc', continue-on-error: 'true'} - {dockerfile: 'fedora', tag: 'intel', build_args: 'TAG=38,INTEL=yes', cmake_args: '-DCMAKE_CXX_COMPILER=icpx -DCMAKE_CXX_FLAGS=-fp-model=precise', continue-on-error: 'true'} continue-on-error: ${{ matrix.config.continue-on-error == 'true' }} env: From f9e6a03893605aa8feffcfc6e5328a1ee876150a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Skrzy=C5=84ski?= Date: Mon, 20 Nov 2023 13:13:38 +0100 Subject: [PATCH 04/11] Use global substitution Co-authored-by: Christoph Junghans --- .github/workflows/continuous-integration-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index dbe0995..784ad85 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -40,7 +40,7 @@ jobs: id: build_args run: | echo "args<> $GITHUB_OUTPUT - echo ${{ matrix.config.build_args }} | sed 's/,/\n/' >> $GITHUB_OUTPUT + echo ${{ matrix.config.build_args }} | sed 's/,/\n/g' >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT - name: Build new image and Load it into Docker for testing uses: docker/build-push-action@v4 From e7c2ca53b3bb22cd268e806621d49f93d21aaadf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Skrzy=C5=84ski?= Date: Mon, 20 Nov 2023 13:11:39 +0100 Subject: [PATCH 05/11] Disable `push` explicitly --- .github/workflows/continuous-integration-workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 784ad85..a2da7d0 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -49,6 +49,7 @@ jobs: file: ${{ matrix.config.dockerfile }} build-args: ${{ steps.build_args.outputs.args }} pull: true + push: false load: true - name: Checkout kokkos uses: actions/checkout@v3 From 84028bd6da1af3a224b6a57bb76b31334bd113ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Skrzy=C5=84ski?= Date: Mon, 20 Nov 2023 13:17:16 +0100 Subject: [PATCH 06/11] Use `icpc` in Intel build for now --- .github/workflows/continuous-integration-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index a2da7d0..220b2e3 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -21,7 +21,7 @@ jobs: - {dockerfile: 'ubuntu', tag: 'devel', build_args: 'TAG=devel', continue-on-error: 'true'} - {dockerfile: 'ubuntu', tag: 'intel', build_args: 'TAG=22.04,INTEL=yes', continue-on-error: 'true'} - {dockerfile: 'opensuse', tag: 'latest'} - - {dockerfile: 'fedora', tag: 'intel', build_args: 'TAG=38,INTEL=yes', cmake_args: '-DCMAKE_CXX_COMPILER=icpx -DCMAKE_CXX_FLAGS=-fp-model=precise', continue-on-error: 'true'} + - {dockerfile: 'fedora', tag: 'intel', build_args: 'TAG=38,INTEL=yes', cmake_args: '-DCMAKE_CXX_COMPILER=icpc', continue-on-error: 'true'} continue-on-error: ${{ matrix.config.continue-on-error == 'true' }} env: docker-tag: ghcr.io/kokkos/ci-containers/${{ matrix.config.dockerfile }}:${{ matrix.config.tag }} From 5afc284de4566add1631110c58a1b5172c19b17d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Skrzy=C5=84ski?= Date: Mon, 20 Nov 2023 20:24:53 +0100 Subject: [PATCH 07/11] Go back to Fedora 37 Co-authored-by: Daniel Arndt --- .github/workflows/continuous-integration-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 220b2e3..68be163 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -21,7 +21,7 @@ jobs: - {dockerfile: 'ubuntu', tag: 'devel', build_args: 'TAG=devel', continue-on-error: 'true'} - {dockerfile: 'ubuntu', tag: 'intel', build_args: 'TAG=22.04,INTEL=yes', continue-on-error: 'true'} - {dockerfile: 'opensuse', tag: 'latest'} - - {dockerfile: 'fedora', tag: 'intel', build_args: 'TAG=38,INTEL=yes', cmake_args: '-DCMAKE_CXX_COMPILER=icpc', continue-on-error: 'true'} + - {dockerfile: 'fedora', tag: 'intel', build_args: 'TAG=37,INTEL=yes', cmake_args: '-DCMAKE_CXX_COMPILER=icpc', continue-on-error: 'true'} continue-on-error: ${{ matrix.config.continue-on-error == 'true' }} env: docker-tag: ghcr.io/kokkos/ci-containers/${{ matrix.config.dockerfile }}:${{ matrix.config.tag }} From 37c50419f7593d08a2b4103c8e8cec3ef0f44b60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Skrzy=C5=84ski?= Date: Mon, 20 Nov 2023 20:29:22 +0100 Subject: [PATCH 08/11] Add back fortran compiler --- fedora | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fedora b/fedora index 7c9667a..73d1580 100644 --- a/fedora +++ b/fedora @@ -11,7 +11,7 @@ RUN ( dnf -y update || dnf -y update ) && \ RUN if [ "${INTEL}" = "yes" ]; then \ printf "[oneAPI]\nname=Intel oneAPI\nbaseurl=https://yum.repos.intel.com/oneapi\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB" > /etc/yum.repos.d/intel-oneapi.repo && \ dnf -y update && \ - dnf -y install intel-oneapi-compiler-dpcpp-cpp intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic && \ + dnf -y install intel-oneapi-compiler-dpcpp-cpp intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic && \ dnf clean all; \ fi From 30768ce870f330a05eb68c7751a5e65918fe056e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Skrzy=C5=84ski?= Date: Tue, 21 Nov 2023 12:53:17 +0100 Subject: [PATCH 09/11] Test icpx using Ubuntu image --- .github/workflows/continuous-integration-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 68be163..8cb66d5 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -19,7 +19,7 @@ jobs: - {dockerfile: 'ubuntu', tag: 'latest'} - {dockerfile: 'ubuntu', tag: 'rolling', build_args: 'TAG=rolling'} - {dockerfile: 'ubuntu', tag: 'devel', build_args: 'TAG=devel', continue-on-error: 'true'} - - {dockerfile: 'ubuntu', tag: 'intel', build_args: 'TAG=22.04,INTEL=yes', continue-on-error: 'true'} + - {dockerfile: 'ubuntu', tag: 'intel', build_args: 'TAG=22.04,INTEL=yes', cmake_args: '-DCMAKE_CXX_COMPILER=icpx -DCMAKE_CXX_FLAGS=-fp-model=precise', continue-on-error: 'true'} - {dockerfile: 'opensuse', tag: 'latest'} - {dockerfile: 'fedora', tag: 'intel', build_args: 'TAG=37,INTEL=yes', cmake_args: '-DCMAKE_CXX_COMPILER=icpc', continue-on-error: 'true'} continue-on-error: ${{ matrix.config.continue-on-error == 'true' }} From 0b3c22b472f6e08f3c75e504c89748ae0b4ad727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Skrzy=C5=84ski?= Date: Thu, 23 Nov 2023 16:34:40 +0100 Subject: [PATCH 10/11] Free disk space before building the images https://github.com/docker/build-push-action/blob/master/TROUBLESHOOTING.md#image-not-loaded --- .github/workflows/continuous-integration-workflow.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 8cb66d5..c1f999f 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -42,6 +42,11 @@ jobs: echo "args<> $GITHUB_OUTPUT echo ${{ matrix.config.build_args }} | sed 's/,/\n/g' >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT + - name: Free Disk space + shell: bash + run: | + sudo rm -rf /usr/local/lib/android + sudo rm -rf /usr/share/dotnet - name: Build new image and Load it into Docker for testing uses: docker/build-push-action@v4 with: From 66652f96a03ecf48e63082cda4cb9f774a75da9e Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Mon, 27 Nov 2023 10:34:57 -0700 Subject: [PATCH 11/11] Update fedora Co-authored-by: Daniel Arndt --- fedora | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fedora b/fedora index 73d1580..7f499d6 100644 --- a/fedora +++ b/fedora @@ -11,7 +11,7 @@ RUN ( dnf -y update || dnf -y update ) && \ RUN if [ "${INTEL}" = "yes" ]; then \ printf "[oneAPI]\nname=Intel oneAPI\nbaseurl=https://yum.repos.intel.com/oneapi\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB" > /etc/yum.repos.d/intel-oneapi.repo && \ dnf -y update && \ - dnf -y install intel-oneapi-compiler-dpcpp-cpp intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic && \ + dnf -y install intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic && \ dnf clean all; \ fi