Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove CI support scripts #895

Merged
merged 19 commits into from
Aug 17, 2023
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
14 changes: 10 additions & 4 deletions .github/workflows/changelog_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ on:
workflow_dispatch:
pull_request:


env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
changelog_update:
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
container:
image: alpine:3.14
Expand All @@ -23,10 +21,18 @@ jobs:
apk add --no-cache bash git openssh
git --version

- name: Checkout repository and housekeeping
- name: Checkout repository
uses: actions/checkout@v3

- run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
cd $GITHUB_WORKSPACE
CI/scripts/changelog_test.sh
git remote add svalinn https://github.com/svalinn/DAGMC.git
git fetch svalinn
change=`git diff svalinn/develop -- doc/CHANGELOG.rst | wc -l`
git remote remove svalinn
if [ $change -eq 0 ]; then
echo "doc/Changelog.rst has not been updated"
exit 1
fi

13 changes: 12 additions & 1 deletion .github/workflows/housekeeping.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,15 @@ jobs:
run: |
cd $GITHUB_WORKSPACE
git config --global --add safe.directory /__w/DAGMC/DAGMC
CI/scripts/housekeeping.sh
find src/ \( -name "*.hpp" -o -name "*.cpp" -o -name "*.hh" -o -name "*.cc" -o -name "*.h" \) \
\( -not -path "src/gtest*" -not -path "src/mcnp/mcnp?/Source/*" -not -path "src/pyne*" \) \
-exec clang-format -style=file -i {} \;
clang_diffs=`git status --porcelain`
if [ -z "${clang_diffs}" ]; then
echo "Style guide checker passed!"
else
echo "ERROR: Style guide checker failed. Please run clang-format."
echo "clang_diffs: ${clang_diffs}"
git diff
exit 1
fi
6 changes: 4 additions & 2 deletions .github/workflows/linux_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ on:
- '.github/workflows/mac_build_test.yml'
- '.github/workflows/windows_build_test.yml'
- '.github/workflows/housekeeping.yml'
- '.github/workflows/changelog_test.yml'
- 'CI/**'
- 'doc/CHANGELOG.rst'
- 'doc/**'
push:
branches:
- develop
Expand All @@ -21,8 +22,9 @@ on:
- '.github/workflows/mac_build_test.yml'
- '.github/workflows/windows_build_test.yml'
- '.github/workflows/housekeeping.yml'
- '.github/workflows/changelog_test.yml'
- 'CI/**'
- 'doc/CHANGELOG.rst'
- 'doc/**'

jobs:
BuildTest:
Expand Down
159 changes: 128 additions & 31 deletions .github/workflows/linux_build_test_merge.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Linux Build/Test on Merge
name: Test against MOAB master on PR merge

on:
# allows us to run workflows manually
Expand All @@ -8,59 +8,156 @@ on:
- develop
paths-ignore:
- '.github/workflows/docker_publish.yml'
- '.github/workflows/linux_build_test.yml'
- '.github/workflows/mac_build_test.yml'
- '.github/workflows/windows_build_test.yml'
- '.github/workflows/housekeeping.yml'
- '.github/workflows/changelog_test.yml'
- 'CI/**'

- 'doc/**'
jobs:
BuildTestMasterDev:
build-dependency-img:
runs-on: ubuntu-latest
env:
hdf5_versions: ${{ matrix.hdf5_versions }}
hdf5_build_dir: hdf5_build_dir

strategy:
matrix:
ubuntu_versions : [
18.04,
20.04,
22.04,
]
compiler : [
gcc,
clang,
]
hdf5_versions : [
1.10.4,
]
moab_versions : [
master,
master,
]

container:
image: ghcr.io/svalinn/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}:stable

name: Installing Dependencies
steps:
- name: default environment
run: |
echo "tag-latest-on-default=false" >> "$GITHUB_ENV"

- name: condition on trigger parameters
if: ${{ github.repository_owner == 'svalinn' && github.ref == 'refs/heads/develop' }}
run: |
echo "tag-latest-on-default=true" >> "$GITHUB_ENV"

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout repository
uses: actions/checkout@v3

- name: Installing Dependencies in Docker image
uses: firehed/multistage-docker-build-action@v1
with:
submodules: recursive
repository: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}
stages: base, external_deps, hdf5
server-stage: moab
quiet: false
parallel: true
tag-latest-on-default: ${{ env.tag-latest-on-default }}
dockerfile: CI/Dockerfile
build-args: COMPILER=${{ matrix.compiler }}, UBUNTU_VERSION=${{ matrix.ubuntu_versions }}, HDF5_VERSION=${{ matrix.hdf5_versions }}, MOAB_BRANCH=${{ matrix.moab_versions }}

- name: Setup
run: |
echo "MOAB_VERSION=${{ matrix.moab_versions }}" >> $GITHUB_ENV
echo "COMPILER=${{ matrix.compiler }}" >> $GITHUB_ENV
echo "HDF5_VERSION=${{ matrix.hdf5_versions }}" >> $GITHUB_ENV
echo "REPO_SLUG=${GITHUB_REPOSITORY}" >> $GITHUB_ENV
echo "PULL_REQUEST=$(echo $GITHUB_REF | cut -d"/" -f3)" >> $GITHUB_ENV
echo "DOUBLE_DOWN="OFF"" >> $GITHUB_ENV
echo "PYTHONPATH=/root/build_dir/moab/bld/pymoab/lib/python3.8/site-packages:${PYTHONPATH}" >> $GITHUB_ENV
ln -s $GITHUB_WORKSPACE /root/build_dir/DAGMC

- name: Building DAGMC
build-dagmc_test-img:
needs: [build-dependency-img]
runs-on: ubuntu-latest

strategy:
matrix:
ubuntu_versions : [
22.04,
]
compiler : [
gcc,
]
hdf5_versions : [
1.10.4,
]
moab_versions : [
master,
]

name: Installing DAGMC
steps:
- name: default environment
run: |
cd $GITHUB_WORKSPACE
CI/scripts/install.sh
echo "tag-latest-on-default=false" >> "$GITHUB_ENV"

- name: Testing DAGMC
- name: condition on trigger parameters
if: ${{ github.repository_owner == 'svalinn' && github.ref == 'refs/heads/develop' }}
run: |
cd $GITHUB_WORKSPACE
CI/scripts/tests.sh
echo "tag-latest-on-default=true" >> "$GITHUB_ENV"

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout repository
uses: actions/checkout@v3

- name: Build & test DAGMC in Docker image
uses: firehed/multistage-docker-build-action@v1
with:
repository: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}
stages: moab, dagmc
server-stage: dagmc_test
quiet: false
parallel: true
tag-latest-on-default: ${{ env.tag-latest-on-default }}
dockerfile: CI/Dockerfile
build-args: COMPILER=${{ matrix.compiler }}, UBUNTU_VERSION=${{ matrix.ubuntu_versions }}, HDF5_VERSION=${{ matrix.hdf5_versions }}, MOAB_BRANCH=${{ matrix.moab_versions }}

push_stable_ci_img:
needs: [build-dagmc_test-img]
runs-on: ubuntu-latest

strategy:
matrix:
ubuntu_versions : [
22.04,
]
compiler : [
gcc,
]
hdf5_versions : [
1.10.4,
]
moab_versions : [
master,
]

name: Pushing final images
steps:
- name: Log in to the Container registry
if: ${{ github.repository_owner == 'svalinn' }}
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push Image as latest img
if: ${{ github.repository_owner == 'svalinn' && github.ref == 'refs/heads/develop' }}
uses: akhilerm/tag-push-action@v2.1.0
with:
src: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}/dagmc:latest
dst: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}:latest

- name: Push Image as latest img
if: ${{ github.repository_owner == 'svalinn' && github.ref == 'refs/heads/develop' }}
uses: akhilerm/tag-push-action@v2.1.0
with:
src: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}:latest
dst: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}:stable
6 changes: 4 additions & 2 deletions .github/workflows/mac_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ on:
- '.github/workflows/linux_build_test.yml'
- '.github/workflows/windows_build_test.yml'
- '.github/workflows/housekeeping.yml'
- '.github/workflows/changelog_test.yml'
- 'CI/**'
- 'doc/CHANGELOG.rst'
- 'doc/**'

push:
branches:
Expand All @@ -22,8 +23,9 @@ on:
- '.github/workflows/linux_build_test.yml'
- '.github/workflows/windows_build_test.yml'
- '.github/workflows/housekeeping.yml'
- '.github/workflows/changelog_test.yml'
- 'CI/**'
- 'doc/CHANGELOG.rst'
- 'doc/**'

release:
types: # This configuration does not affect the page_build event above
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/windows_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ on:
- '.github/workflows/linux_build_test.yml'
- '.github/workflows/mac_build_test.yml'
- '.github/workflows/housekeeping.yml'
- '.github/workflows/changelog_test.yml'
- 'CI/**'
- 'doc/CHANGELOG.rst'
- 'doc/**'

push:
branches:
Expand All @@ -22,8 +23,9 @@ on:
- '.github/workflows/linux_build_test.yml'
- '.github/workflows/mac_build_test.yml'
- '.github/workflows/housekeeping.yml'
- '.github/workflows/changelog_test.yml'
- 'CI/**'
- 'doc/CHANGELOG.rst'
- 'doc/**'

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
22 changes: 0 additions & 22 deletions CI/docker/build_embree.sh

This file was deleted.

35 changes: 0 additions & 35 deletions CI/docker/build_geant4.sh

This file was deleted.

Loading