-
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.
Override on testing as we shutdown CircleCI testing in conjunction with this PR. GitHub actions are passing. * update libxml requiremnt in cmakelists * update sqlite requirement in cmakelists * add Dockerfile and workflows * delete circle.yml * convert from nose to pytest * change names in workflow to be more descriptive * resolve docker config errors in workflows squash 10 debugging commits * full testing matrix * less ambigous find command * use fixture in test_run_inputs.py
- Loading branch information
1 parent
f097146
commit 038239e
Showing
8 changed files
with
342 additions
and
391 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,55 @@ | ||
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: Build Cycamore | ||
run: | | ||
python install.py --prefix=/root/.local --cyclus-root=/root/.local -j 2 --build-type=Release --core-version 99999.99999 | ||
- name: Cycamore Unit Tests | ||
run: | | ||
cycamore_unit_tests | ||
- name: Cycamore Python Tests | ||
run: | | ||
export PYTHONPATH=$(find /root/.local/lib -type d -name 'cyclus-*-*.egg' -print -quit) | ||
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 Publish Cycamore 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 Cycamore 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: Multi-Stage Build Action | ||
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
This file was deleted.
Oops, something went wrong.
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 |
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
Oops, something went wrong.