Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ variables:
# Nested variables are allowed and useful to customize the job command. We
# prevent variable expansion so that you can define them at job level.
JOB_CMD:
value: "buildscripts/gitlab/create-conda-pkgs.sh"
value: "buildscripts/gitlab/build-and-test.sh"
expand: false
# Override the pattern describing branches that will skip the "draft PR filter
# test". Add protected branches here. See default value in
Expand Down
4 changes: 2 additions & 2 deletions .gitlab/custom-jobs-and-variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ variables:
# Tioga
# Arguments for top level allocation
# OPTIONAL: "-o per-resource.count=2" allows to get 2 jobs running on each node.
# TIOGA_SHARED_ALLOC: "--queue=pci --exclusive --time-limit=15m --nodes=1"
TIOGA_SHARED_ALLOC: "--queue=pci --exclusive --time-limit=30m --nodes=1"
# Arguments for job level allocation
# TIOGA_JOB_ALLOC: "--nodes=1 --begin-time=+5s"
TIOGA_JOB_ALLOC: "--nodes=1 --begin-time=+5s"
# Add variables that should apply to all the jobs on a machine:
# TIOGA_MY_VAR: "..."

Expand Down
52 changes: 0 additions & 52 deletions .gitlab/jobs/ruby.yml

This file was deleted.

17 changes: 5 additions & 12 deletions .gitlab/jobs/lassen.yml → .gitlab/jobs/tioga.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
# definition of these variables in a generic fashion. By overriding the
# following section, projects can specify the variables to define in the
# reproducer to exactly reproduce the CI build.
.lassen_reproducer_vars:
.tioga_reproducer_vars:
script:
- echo -e "Running on Lassen\n"
- echo -e "Running on tioga\n"

# With GitLab CI, included files cannot be empty.
# TODO: remove when you have at least on job defined.
Expand All @@ -39,18 +39,13 @@ variables:
## Note: placing the extends section first allows you to override part of the
## shared implementation if needed (and if you know what you are doing).
#<job-name (typically build target description)>:
# extends: .job_on_lassen
# extends: .job_on_tioga
# variables:
# <A_VARIABLE>: "<with job specific value>"

.base-job:
extends: .job_on_lassen
before_script:
- source /usr/workspace/ggeorgak/lassen/miniconda3-env.sh
- conda config --set anaconda_upload yes
extends: .job_on_tioga
after_script:
- source /usr/workspace/ggeorgak/lassen/miniconda3-env.sh
- conda config --set anaconda_upload no
- rm -rf ${CI_BUILDS_DIR} ${CI_PROJECT_DIR}

.python-variants:
Expand All @@ -62,7 +57,5 @@ variables:
- "3.11"
- "3.12"

build-pyomp-lassen:
build-and-test-tioga:
extends: [.base-job, .python-variants]
variables:
PYOMP_CI_BUILD_PKG: "pyomp"
20 changes: 10 additions & 10 deletions .gitlab/subscribed-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@


## TIOGA
#tioga-up-check:
# variables:
# CI_MACHINE: "tioga"
# extends: [.machine-check]
#
#tioga-build-and-test:
# variables:
# CI_MACHINE: "tioga"
# needs: [tioga-up-check]
# extends: [.build-and-test]
tioga-up-check:
variables:
CI_MACHINE: "tioga"
extends: [.machine-check]

tioga-build-and-test:
variables:
CI_MACHINE: "tioga"
needs: [tioga-up-check]
extends: [.build-and-test]
40 changes: 40 additions & 0 deletions buildscripts/gitlab/build-and-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env bash

set -e

# Create a unique temporary directory for this job.
TMPDIR=/tmp/pyomp/${CI_JOB_ID}
mkdir -p ${TMPDIR}
pushd ${TMPDIR}

# Set the envs directory under the temporary directory.
export CONDA_ENVS_DIRS="${TMPDIR}/_stage/miniconda3/envs"

# Install miniconda and llvmdev, clang14 environments.
source ${CI_PROJECT_DIR}/buildscripts/cibuildwheel/setup-miniconda3.sh

# Export environment variables for building and testing.
export LLVM_DIR="${CONDA_ENVS_DIRS}/llvmdev"
export CLANG_TOOL="${CONDA_ENVS_DIRS}/clang14/bin/clang"
export USE_CXX11_ABI="1"
export PIP_NO_INPUT="1"

# Create and activate a conda environment with the desired Python version.
conda create -n py-${PYOMP_CI_PYTHON_VERSION} -c conda-forge -y python=${PYOMP_CI_PYTHON_VERSION}
conda activate py-${PYOMP_CI_PYTHON_VERSION}

# Clone and fetch the commit with history for package versioning.
git clone https://github.com/${GITHUB_PROJECT_ORG}/${GITHUB_PROJECT_NAME}.git --single-branch
cd ${GITHUB_PROJECT_NAME}
git fetch origin ${CI_COMMIT_SHA}
git checkout ${CI_COMMIT_SHA}

# Install pyomp.
CC=gcc CXX=g++ python -m pip install -v .

# Run host OpenMP tests.
TEST_DEVICES=0 RUN_TARGET=0 python -m numba.runtests -v -- numba.openmp.tests.test_openmp
# Run device (cpu target) OpenMP tests.
OMP_TARGET_OFFLOAD=mandatory TEST_DEVICES=1 RUN_TARGET=1 python -m numba.runtests -v -- numba.openmp.tests.test_openmp.TestOpenmpTarget

popd
6 changes: 3 additions & 3 deletions buildscripts/gitlab/create-conda-pkgs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fi

# Create a temporary directory for the build to clone the full repo for package
# versioning.
TMPDIR=/tmp/ggeorgak/${CI_JOB_ID}
TMPDIR=/tmp/pyomp/${CI_JOB_ID}
mkdir -p ${TMPDIR}
pushd ${TMPDIR}

Expand All @@ -21,7 +21,7 @@ git fetch origin ${CI_COMMIT_SHA}
git checkout ${CI_COMMIT_SHA}

# Set pkg dir per job to avoid conflicts.
export CONDA_PKGS_DIRS=/tmp/ggeorgak/conda-pkgs-${CI_JOB_ID}
export CONDA_PKGS_DIRS=/tmp/pyomp/conda-pkgs-${CI_JOB_ID}
mkdir -p "$CONDA_PKGS_DIRS"

function deploy_conda() {
Expand All @@ -31,7 +31,7 @@ function deploy_conda() {

set -x

export CONDA_BLD_PATH="/tmp/ggeorgak/conda-build-${PYOMP_CI_BUILD_PKG}-${PYOMP_CI_PYTHON_VERSION}"
export CONDA_BLD_PATH="/tmp/pyomp/conda-build-${PYOMP_CI_BUILD_PKG}-${PYOMP_CI_PYTHON_VERSION}"
conda build --no-lock --no-locking --user python-for-hpc --label ${LABEL} \
-c python-for-hpc/label/${LABEL} -c conda-forge \
--python ${PYOMP_CI_PYTHON_VERSION} \
Expand Down