From 13bd8a5dd1e89b01b95a95a00bc311762122e5ef Mon Sep 17 00:00:00 2001 From: Raghu Raja Date: Mon, 26 Feb 2024 05:17:21 +0000 Subject: [PATCH] ci: Add Neuron to the distcheck matrix Extend the PR CI test matrix to include a Neuron build. We don't really need to install the Neuron runtime since we don't use NRT symbols directly, but mimic'ing a typical deployment where that's available is easy and also helps catch any NRT-specific version requirements we might add. Same runtime as before as the runners for the matrix get kicked off in parallel. Signed-off-by: Raghu Raja --- .github/workflows/distcheck.yaml | 56 +++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 12 deletions(-) diff --git a/.github/workflows/distcheck.yaml b/.github/workflows/distcheck.yaml index d9f1bf203..9bdf6b317 100644 --- a/.github/workflows/distcheck.yaml +++ b/.github/workflows/distcheck.yaml @@ -16,40 +16,72 @@ jobs: cc: - gcc - clang + sdk: + - cuda + - neuron fail-fast: false steps: - name: Install Dependencies run: | + sudo apt-get update -y sudo apt-get install -y ${{ env.APT_PACKAGES }} - - name: Install CUDA + - name: Install CUDA SDK + if: matrix.sdk == 'cuda' run: | sudo apt-get install -y nvidia-cuda-toolkit - - uses: actions/checkout@v4 - - name: Build and Distribution Checks + - name: Install Neuron SDK + if: matrix.sdk == 'neuron' run: | - set -x + # Configure Linux for Neuron repository updates + sudo tee /etc/apt/sources.list.d/neuron.list > /dev/null << EOF + deb https://apt.repos.neuron.amazonaws.com jammy main + EOF + wget -qO - https://apt.repos.neuron.amazonaws.com/GPG-PUB-KEY-AMAZON-AWS-NEURON.PUB | sudo apt-key add - + sudo apt update -y + # Install Neuron Runtime + sudo apt-get install aws-neuronx-runtime-lib -y + + - uses: actions/checkout@v4 + - name: Install Libfabric + run: | # We're just doing distchecks, so it is fine if we - # just grab the latest master. + # just grab the latest master and built a lean build. git clone --depth 1 https://github.com/ofiwg/libfabric.git pushd libfabric ./autogen.sh - ./configure --prefix=$PWD/install CC=${{ matrix.cc }} + ./configure --prefix=$PWD/install \ + --disable-sockets \ + --disable-udp \ + --disable-mrail \ + --disable-opx \ + CC=${{ matrix.cc }} make -j $(nproc) make install popd + - name: Build Plugin + run: | + set -x + # actions/checkout@v4 would drop the plugin source in $PWD, - # so go ahead and build it + # so go ahead and build it. ./autogen.sh - ./configure --with-libfabric=$PWD/libfabric/install --with-cuda=/usr/local/cuda/ CC=${{ matrix.cc }} + if [ ${{ matrix.sdk }} == "cuda" ] + then + ./configure --with-libfabric=$PWD/libfabric/install \ + --with-cuda=/usr/local/cuda/ \ + CC=${{ matrix.cc }} + else + ./configure --with-libfabric=$PWD/libfabric/install \ + --enable-neuron \ + CC=${{ matrix.cc }} + fi make -j $(nproc) - # Run Unit tests - make check + - name: Run Dist Check + run: make distcheck - # Run dist tarball checks - make distcheck - name: Upload build logs if: failure() uses: actions/upload-artifact@v4