-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6ee8f56
commit 860eb11
Showing
3 changed files
with
137 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Build/Test for PR and collaborator push | ||
|
||
on: | ||
# allows us to run workflows manually | ||
workflow_dispatch: | ||
pull_request: | ||
paths-ignore: | ||
- '.github/workflows/build_test_publish.yml' | ||
- 'docker/**' | ||
- 'doc/**' | ||
push: | ||
paths-ignore: | ||
- '.github/workflows/build_test_publish.yml' | ||
- 'docker/**' | ||
- 'doc/**' | ||
|
||
jobs: | ||
build-and-test: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ubuntu_versions : [ | ||
20.04, | ||
22.04, | ||
] | ||
pkg_mgr : [ | ||
apt, | ||
conda, | ||
] | ||
cyclus_tag: [ | ||
latest, | ||
] | ||
|
||
container: | ||
image: ghcr.io/cyclus/cyclus_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cyclus:${{matrix.cyclus_tag}} | ||
|
||
steps: | ||
- name: Checkout Cycamore | ||
uses: actions/checkout@v3 | ||
|
||
- name: Change Home | ||
run: | | ||
echo "HOME=/root" >> "$GITHUB_ENV" | ||
- name: Build Cycamore | ||
run: | | ||
python install.py --prefix=/root/.local -j 2 --build-type=Release --core-version 99999.99999 | ||
- name: Cycamore Unit Tests | ||
run: | | ||
cycamore_unit_tests | ||
- name: Cycamore Python Tests | ||
run: | | ||
cd tests && python -m pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Build and Test Dependency Images | ||
|
||
on: | ||
# allows us to run workflows manually | ||
workflow_dispatch: | ||
pull_request: | ||
paths: | ||
- '.github/workflows/build_test_publish.yml' | ||
- 'docker/**' | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- '.github/workflows/build_test_publish.yml' | ||
- 'docker/**' | ||
|
||
jobs: | ||
build-dependency-and-test-img: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
ubuntu_versions : [ | ||
20.04, | ||
22.04, | ||
] | ||
pkg_mgr : [ | ||
apt, | ||
conda, | ||
] | ||
|
||
name: Installing Dependencies, Building cyclus and running tests | ||
steps: | ||
- name: default environment | ||
run: | | ||
echo "tag-latest-on-default=false" >> "$GITHUB_ENV" | ||
- name: condition on trigger parameters | ||
if: ${{ github.repository_owner == 'cyclus' && github.ref == 'refs/heads/main' }} | ||
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: | ||
repository: ghcr.io/${{ github.repository_owner }}/cycamore_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }} | ||
stages: cycamore | ||
server-stage: cycamore-test | ||
quiet: false | ||
parallel: true | ||
tag-latest-on-default: ${{ env.tag-latest-on-default }} | ||
dockerfile: docker/Dockerfile | ||
build-args: pkg_mgr=${{ matrix.pkg_mgr }}, ubuntu_version=${{ matrix.ubuntu_versions }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
ARG pkg_mgr=apt | ||
ARG ubuntu_version=22.04 | ||
|
||
FROM ghcr.io/cyclus/cyclus_${ubuntu_version}_${pkg_mgr}/cyclus as cycamore | ||
ARG make_cores=2 | ||
|
||
COPY . /cycamore | ||
WORKDIR /cycamore | ||
|
||
RUN python install.py -j ${make_cores} --build-type=Release --core-version 99999.99999 | ||
|
||
FROM cycamore as cycamore-test | ||
RUN cycamore_unit_tests | ||
|
||
FROM cycamore as cycamore-pytest | ||
RUN cd tests && python -m pytest |