Skip to content

Commit

Permalink
CI: run bamboo
Browse files Browse the repository at this point in the history
  • Loading branch information
berquist committed Aug 28, 2024
1 parent 14373ca commit 5524e68
Show file tree
Hide file tree
Showing 3 changed files with 151 additions and 6 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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"
16 changes: 10 additions & 6 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -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
110 changes: 110 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5524e68

Please sign in to comment.