From 5524e680e102c456fc84de7fcdad73412492c59b Mon Sep 17 00:00:00 2001 From: Eric Berquist Date: Fri, 9 Aug 2024 18:37:52 +0000 Subject: [PATCH] CI: run bamboo --- .github/workflows/ci.yml | 31 +++++++++ .github/workflows/pre-commit.yml | 16 +++-- .github/workflows/test.yml | 110 +++++++++++++++++++++++++++++++ 3 files changed, 151 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..e9899c17 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +--- +name: ci + +# yamllint disable-line rule:truthy +on: + push: + pull_request: + +concurrency: + # yamllint disable-line rule:line-length + group: ci-${{github.ref}}-${{github.event.pull_request.number || github.run_number}} + cancel-in-progress: true + +jobs: + prechecks: + uses: ./.github/workflows/pre-commit.yml + all-prechecks: + needs: [prechecks] + runs-on: ubuntu-latest + steps: + - name: Success + run: "true" + tests: + needs: [prechecks] + uses: ./.github/workflows/test.yml + all: + needs: [tests] + runs-on: ubuntu-latest + steps: + - name: Success + run: "true" diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index c2a1ed45..f64a609e 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,16 +1,20 @@ --- -# In the absence of using the pre-commit.ci service... name: pre-commit # yamllint disable-line rule:truthy on: - pull_request: - push: + workflow_call: + workflow_dispatch: + +concurrency: + # yamllint disable-line rule:line-length + group: style-${{github.ref}}-${{github.event.pull_request.number || github.run_number}} + cancel-in-progress: true jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 - - uses: pre-commit/action@v3.0.0 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..26b01f63 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,110 @@ +--- +# yamllint disable rule:line-length +name: run bamboo + +# yamllint disable-line rule:truthy +on: + workflow_call: + workflow_dispatch: + +concurrency: + group: test-${{github.ref}}-${{github.event.pull_request.number || github.run_number}} + cancel-in-progress: true + +jobs: + run-bamboo: + strategy: + fail-fast: false + matrix: + os: + - macos-14 + - ubuntu-24.04 + build-type: + - sstmainline_config + - sstmainline_coreonly_config + - sstmainline_config_no_mpi + - sstmainline_coreonly_config_no_mpi + - sstmainline_config_make_dist_test + - sstmainline_config_core_make_dist_test + exclude: + - os: macos-14 + build-type: sstmainline_config + - os: macos-14 + build-type: sstmainline_coreonly_config + - os: macos-14 + build-type: sstmainline_config_make_dist_test + - os: macos-14 + build-type: sstmainline_config_core_make_dist_test + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - name: install system-level dependencies (macOS) + run: | + brew install \ + autoconf \ + automake \ + coreutils \ + doxygen \ + libtool \ + lmod \ + ncurses \ + pygments + python -m pip install blessings + # echo "source /opt/homebrew/opt/lmod/init/profile" >> ~/.bashrc + if: matrix.os == 'macos-14' + - name: install system-level dependencies (Ubuntu) + run: | + export DEBIAN_FRONTEND=noninteractive + sudo apt-get -y update + sudo apt-get -y install \ + autoconf \ + automake \ + doxygen \ + libopenmpi-dev \ + libtool-bin \ + lmod \ + python3-blessings \ + python3-pygments + # echo "source /usr/share/lmod/lmod/init/bash" >> ~/.bashrc + if: matrix.os == 'ubuntu-24.04' + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + create-symlink: true + key: ${{ matrix.os }}-${{ matrix.build-type }} + - name: set env and prepare dir structure + run: | + # Keep this common in order to increase ccache effectiveness + # sst_deps_user_dir="${GITHUB_WORKSPACE}/../${GITHUB_RUN_ID}_${GITHUB_RUN_NUMBER}_${GITHUB_RUN_ATTEMPT}" + sst_deps_user_dir="${GITHUB_WORKSPACE}/../sst-deps-user-dir" + mkdir -p "${sst_deps_user_dir}" + SST_DEPS_USER_DIR="$(realpath "${sst_deps_user_dir}")" + echo "SST_DEPS_USER_DIR=${SST_DEPS_USER_DIR}" >> "${GITHUB_ENV}" + - name: fetch elements dependencies + run: | + pristine="${SST_DEPS_USER_DIR}"/sstDeps/src/pristine + mkdir -p "${pristine}" + cd "${pristine}" + wget https://github.com/umd-memsys/DRAMSim2/archive/refs/tags/v2.2.2.tar.gz + - name: run bamboo + run: | + # needed for ncurses part of interactive sst-info + export TERM=dumb + MAKEFLAGS="-j$(nproc)" + export MAKEFLAGS + if [[ "$(uname)" == "Darwin" ]]; then + export PMIX_MCA_gds=hash + fi + export SST_DEPS_USER_MODE=1 + mkdir -p "${SST_DEPS_USER_DIR}/devel/trunk" + mv "${GITHUB_WORKSPACE}" "${SST_DEPS_USER_DIR}/devel/sqe" + cd "${SST_DEPS_USER_DIR}/devel/trunk" + ../sqe/buildsys/bamboo.sh ${{ matrix.build-type }} none none none none none + ccache -s -vv + - uses: actions/upload-artifact@v4 + with: + name: test-output-${{ matrix.os }}-${{ matrix.build-type }} + path: sst_test_outputs + compression-level: 9 + if: '!cancelled()' +# yamllint enable rule:line-length