From 30b25aaca3931d2c2da18c43b037f646699f96c5 Mon Sep 17 00:00:00 2001 From: Nicholas Sielicki Date: Thu, 22 Aug 2024 17:04:32 -0700 Subject: [PATCH] fixup! ci: add al2023 rpm builds --- .github/workflows/srpm.yaml | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/.github/workflows/srpm.yaml b/.github/workflows/srpm.yaml index 8656dc1a0..4544cac11 100644 --- a/.github/workflows/srpm.yaml +++ b/.github/workflows/srpm.yaml @@ -2,7 +2,7 @@ name: Package Generation on: [push, pull_request] jobs: srpm: - name: Generate SRPM + name: "Generate SRPM" runs-on: ubuntu-latest container: image: fedora:rawhide @@ -18,8 +18,9 @@ jobs: path: "*.src.rpm" if-no-files-found: 'error' compression-level: '0' + mock-rpm: - runs-on: ubuntu-latest + runs-on: codebuild-ghactions-al2023-${{ github.run_id }}-${{ github.run_attempt }} needs: srpm strategy: matrix: @@ -34,20 +35,40 @@ jobs: accel_repo: "" efa_repo: "./aws-efa-installer/RPMS/ALINUX2023/x86_64/" mock: "/etc/mock/amazonlinux-2023-x86_64.cfg" - name: [rpm] ${{ matrix.name }} - container: - image: fedora:rawhide - options: --privileged + - name: rocky9-x86-neuron-aws + args: "--define 'with_neuron 1' --define 'with_platform_aws 1'" + accel_repo: "" + efa_repo: "./aws-efa-installer/RPMS/ROCKYLINUX9/x86_64/" + mock: "/etc/mock/rocky+epel-9-x86_64.cfg" + - name: rocky9-x86-cuda-aws + args: "--define 'with_neuron 1' --define 'with_platform_aws 1'" + accel_repo: --addrepo "https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/" + efa_repo: "./aws-efa-installer/RPMS/ROCKYLINUX9/x86_64/" + mock: "/etc/mock/rocky+epel-9-x86_64.cfg" + - name: rocky9-aarch64-neuron-aws + args: "--define 'with_neuron 1' --define 'with_platform_aws 1'" + accel_repo: "" + efa_repo: "./aws-efa-installer/RPMS/ROCKYLINUX9/aarch64/" + mock: "/etc/mock/rocky+epel-9-aarch64.cfg" + - name: rocky9-aarch64-cuda-aws + args: "--define 'with_neuron 1' --define 'with_platform_aws 1'" + accel_repo: --addrepo "https://developer.download.nvidia.com/compute/cuda/repos/rhel9/aarch64/" + efa_repo: "./aws-efa-installer/RPMS/ROCKYLINUX9/aarch64/" + mock: "/etc/mock/rocky+epel-9-aarch64.cfg" + + name: rpm ${{ matrix.name }} steps: - - run: dnf install -y mock nodejs unzip curl createrepo_c + - run: dnf install -y mock nodejs createrepo_c sudo - uses: actions/download-artifact@master with: name: "libnccl-net-ofi.src.rpm" path: . + - run: useradd mockbuilder + - run: usermod -a -G mock,wheel mockbuilder - run: curl -O https://efa-installer.amazonaws.com/aws-efa-installer-latest.tar.gz - run: tar xf ./aws-efa-installer-latest.tar.gz - run: bash -c "cd ${{ matrix.efa_repo }} && createrepo_c ." - - run: mock --verbose --addrepo $(realpath ${{ matrix.efa_repo }}) ${{ matrix.accel_repo }} -r ${{ matrix.mock }} ${{ matrix.args }} *.src.rpm + - run: sudo -u mockbuilder -- mock --isolation=simple --verbose --addrepo $(realpath ${{ matrix.efa_repo }}) ${{ matrix.accel_repo }} -r ${{ matrix.mock }} ${{ matrix.args }} *.src.rpm - run: rpm -qpl /var/lib/mock/**/result/*.rpm #- uses: actions/upload-artifact@v4 # with: