Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
41 changes: 41 additions & 0 deletions .gitlab/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
This note describes the setup of our GitHub/GitLab integration. The main
AMReX repo is hosted at https://github.com/AMReX-Codes/amrex, with a mirror
at https://gitlab.spack.io/amrex/amrex. The GitLab mirror runs CI tests on
runners hosted at
https://systems.nic.uoregon.edu/internal-wiki/index.php?title=Category:Servers. We
run three types of tests: nightly tests using the development branch, tests
triggerd when new commits are pushed to the GitLab mirror (either through
GitLab's regular pulling of the latest development branch from GitHub or by
the developers directly), and tests triggered by a special comment from
maintainers.

Instructions for creating a pull mirror can be found at
https://docs.gitlab.com/user/project/repository/mirror/pull/. You can choose
to pull selected branches or all branches. For AMReX, this choice does not
matter since we only have one active branch. However, for repoositories with
many active branches, pulling all branches may trigger CI jobs on every
activity.

Instructions for creating schedules pipelines can be found at
https://docs.gitlab.com/ci/pipelines/schedules/. By default, GitLab uses
`.gitlab-ci.yml` at the repository root for pipeline configurations, but
this can be changed. AMReX's GitLab CI file is in the `.gitlab`
directory. To change the configuration file location, select `Settings ->
CI/CD -> General pipelines` and update `CI/CD configuration file`.

CI/CD jobs triggered by push require no special setup. They can also be
disabled.

For GitHub PR triggered jobs, we choose not to run automatically. Instead
they need to be triggered by a `/run-hpsf-gitlab-ci` comment from authorized
maintainers, which starts the `run-hpsf-gitlab-ci` workflow defined in
`.github/workflows/trigger-hpsf-gitlab-ci.yml`. This workflow uses GitLab's
REST API to start a pipeline job on GitLab. The PR comment triggered
pipeline job uses the same configuration file shared with the scheduled
pipeline: `.gitlab/hpsf-gitlab-ci.yml`. The PR comment triggered job pulls
the PR branch from GitHub first before running tests. For this approach to
work, we store a pipeline trigger (obtained from GitLab's `Settings -> CI/CD
-> Pipeline trigger tokens`) as a secret at GitHub's `Settings -> Secrets
and variables -> Actions -> Repository secrets`. The GitHub workflow waits
for the result of the GitLab pipeline result and posts the final status and
a link to the result as a comment.
1 change: 1 addition & 0 deletions .gitlab/hpsf-gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ workflow:
echo "GITHUB_MERGE_REF=$GITHUB_MERGE_REF"
echo "GITHUB_TRIGGER_ACTOR=$GITHUB_TRIGGER_ACTOR"
echo "GITHUB_PR_TITLE=$GITHUB_PR_TITLE"
git remote remove github
git remote add github https://github.com/amrex-codes/amrex.git
git fetch --depth=1 github "${GITHUB_MERGE_REF}"
git checkout FETCH_HEAD
Expand Down
4 changes: 4 additions & 0 deletions Tests/Algebra/GMRES/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
if (AMReX_SYCL)
return()
endif()

foreach(D IN LISTS AMReX_SPACEDIM)
set(_sources main.cpp)
set(_input_files )
Expand Down
8 changes: 8 additions & 0 deletions Tests/FFT/C2C/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
foreach(D IN LISTS AMReX_SPACEDIM)
if (D EQUAL 2)
return()
endif()

if (D EQUAL 3)
return()
endif()

set(_sources main.cpp)

set(_input_files)
Expand Down
Loading