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

Circle 2 GitHubAction #1569

Merged
merged 15 commits into from
Aug 14, 2021
50 changes: 50 additions & 0 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Standard Build and Test

on:
# allows us to run workflows manually
workflow_dispatch:
pull_request:
branches:
- master
paths-ignore:
- '.github/workflows/docker_publish.yml'

push:
branches:
- master
paths-ignore:
- '.github/workflows/docker_publish.yml'


jobs:
BuildTest:
runs-on: ubuntu-latest

container:
image: cyclus/cyclus-deps

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: setup
run: |
echo "HOME=/github/home/" >> $GITHUB_ENV
echo "PATH=$PATH:${HOME}/.local/bin" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${HOME}/.local/lib" >> $GITHUB_ENV
- name: Building Cyclus
run: |
mkdir -p ${HOME}/.local/lib/python3.7/site-packages/
cd ${GITHUB_WORKSPACE}
python install.py -j 2 \
--build-type=Release --core-version 999999.999999 \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I haven't noticed this before, but what is core-version and is this the right one?

-DBLAS_LIBRARIES="/opt/conda/lib/libblas.so" \
-DLAPACK_LIBRARIES="/opt/conda/lib/liblapack.so"

- name: Unit Test
run: |
cyclus_unit_tests; exit $?

- name: Nosetest
run: |
nosetests -w ${GITHUB_WORKSPACE}/tests; exit $?
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Since last release
machine with a single python3 install (such as a fresh Ubuntu 20.04), install
will fail unless update-alternatives has been used to point python at the
correct python3 version (#1558)
* build and test are now fown on githubAction in place or CircleCI (#1569)


**Changed:**
Expand Down
80 changes: 0 additions & 80 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,5 @@
version: 2
jobs:
# Build Cyclus
build:
docker:
- image: cyclus/cyclus-deps
working_directory: ~/cyclus
steps:
- checkout
- run:
name: Build Cyclus
command: |
python install.py -j 2 --build-type=Release --core-version 999999.999999 \
-DBLAS_LIBRARIES="/opt/conda/lib/libblas.so" \
-DLAPACK_LIBRARIES="/opt/conda/lib/liblapack.so"
- run:
name: save SHA to a file
command: echo $CIRCLE_SHA1 > .circle-sha
- save_cache:
key: v1-repo-{{ checksum ".circle-sha" }}
paths:
- /root


# Test Jobs
unit_test:
docker:
- image: cyclus/cyclus-deps
working_directory: /root
steps:
- run:
name: save SHA to a file
command: echo $CIRCLE_SHA1 > .circle-sha
- restore_cache:
keys:
- v1-repo-{{ checksum ".circle-sha" }}
- run:
name: Unit Test
command: /root/.local/bin/cyclus_unit_tests; exit $?

nosetest:
docker:
- image: cyclus/cyclus-deps
working_directory: /root
steps:
- run:
name: save SHA to a file
command: echo $CIRCLE_SHA1 > .circle-sha
- restore_cache:
keys:
- v1-repo-{{ checksum ".circle-sha" }}
- run:
name: Nosetest
command: nosetests -w ~/cyclus/tests; exit $?


# Update docker container
deploy_latest: # Cyclus/dev -> Cyclus:latest
docker:
Expand Down Expand Up @@ -205,32 +151,12 @@ workflows:
version: 2 #Needed ?? (already on the top of the file)
build_and_test:
jobs:
- build
- unit_test:
requires:
- build
- nosetest:
requires:
- build

- cycamore_master:
requires:
- unit_test
- nosetest
- cymetric_master:
requires:
- unit_test
- nosetest


# Merge on Master
- deploy_latest:
filters:
branches:
only: master
requires:
- unit_test
- nosetest
- cyXX_trig:
filters:
branches:
Expand All @@ -245,15 +171,9 @@ workflows:
ignore: /.*/
tags:
only: /.*/
requires:
- unit_test
- nosetest
- deb_generation:
filters:
branches:
ignore: /.*/
tags:
only: /.*/
requires:
- unit_test
- nosetest