diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml new file mode 100644 index 0000000000..eba3f30d64 --- /dev/null +++ b/.github/workflows/build_test.yml @@ -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 \ + -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 $? diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d3bda8ce5f..9dc54da862 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -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:** diff --git a/circle.yml b/circle.yml index 830d0438f4..0495b0a626 100644 --- a/circle.yml +++ b/circle.yml @@ -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: @@ -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: @@ -245,15 +171,9 @@ workflows: ignore: /.*/ tags: only: /.*/ - requires: - - unit_test - - nosetest - deb_generation: filters: branches: ignore: /.*/ tags: only: /.*/ - requires: - - unit_test - - nosetest