diff --git a/.github/workflows/build-coq-bignums.yml b/.github/workflows/build-coq-bignums.yml new file mode 100644 index 0000000..c956779 --- /dev/null +++ b/.github/workflows/build-coq-bignums.yml @@ -0,0 +1,54 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + branches: + - '**' + +jobs: + build: + # the OS must be GNU/Linux to be able to use the docker-coq-action + runs-on: ubuntu-latest + strategy: + matrix: + image: + - 'coqorg/coq:dev' + fail-fast: false + steps: + - uses: actions/checkout@v2 + - uses: coq-community/docker-coq-action@v1 + with: + opam_file: 'coq-bignums.opam' + custom_image: ${{ matrix.image }} + custom_script: | + startGroup Print opam config + opam config list; opam repo list; opam list + endGroup + startGroup Build dependencies + opam pin add -n -y -k path $PACKAGE $WORKDIR + opam update -y + opam install -y -j 2 $PACKAGE --deps-only + endGroup + startGroup Build + opam install -y -v -j 2 $PACKAGE + opam list + endGroup + startGroup Workaround permission issue + sudo chown coq:coq . + endGroup + startGroup Run tests + make -C tests + endGroup + startGroup Uninstallation test + opam remove $PACKAGE + endGroup + - name: Revert permissions + if: ${{ always() }} + run: sudo chown 1001:116 . + +# See also: +# https://github.com/coq-community/docker-coq-action#readme +# https://github.com/erikmd/docker-coq-github-action-demo diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 759dfc5..0000000 --- a/.travis.yml +++ /dev/null @@ -1,63 +0,0 @@ -os: linux -dist: bionic -language: shell - -.opam: &OPAM - services: docker - install: | - # Prepare the COQ container - docker pull ${COQ_IMAGE} - docker run -d -i --init --name=COQ -v ${TRAVIS_BUILD_DIR}:/home/coq/${CONTRIB_NAME} -w /home/coq/${CONTRIB_NAME} ${COQ_IMAGE} - docker exec COQ /bin/bash --login -c " - # This bash script is double-quoted to interpolate Travis CI env vars: - echo \"Build triggered by ${TRAVIS_EVENT_TYPE}\" - export PS4='+ \e[33;1m(\$0 @ line \$LINENO) \$\e[0m ' - set -ex # -e = exit on failure; -x = trace for debug - opam update -y - opam remove -y coq-bignums # remove the coq-bignums from the docker image - opam pin add ${CONTRIB_NAME} . -y -n -k path - opam install ${CONTRIB_NAME} -y -j ${NJOBS} --deps-only - opam config list - opam repo list - opam list - " - script: - - echo -e "${ANSI_YELLOW}Building and testing ${CONTRIB_NAME}...${ANSI_RESET}" && echo -en 'travis_fold:start:script\\r' - - | - docker exec COQ /bin/bash --login -c " - export PS4='+ \e[33;1m(\$0 @ line \$LINENO) \$\e[0m ' - set -ex - sudo chown -R coq:coq /home/coq/${CONTRIB_NAME} - opam install ${CONTRIB_NAME} -v -y -j ${NJOBS} - " - - | - docker exec COQ /bin/bash --login -c " - export PS4='+ \e[33;1m(\$0 @ line \$LINENO) \$\e[0m ' - set -ex - cd tests - make - " - - docker stop COQ # optional - - echo -en 'travis_fold:end:script\\r' - -.nix: &NIX - language: nix - nix: 2.3.5 - script: - - nix-build --argstr coq-url "$COQ" --extra-substituters https://coq.cachix.org --trusted-public-keys "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= coq.cachix.org-1:5QW/wwEnD+l2jvN6QRbRRsa4hBHG3QiQQ26cxu1F5tI=" - -jobs: - include: - - # Test supported versions of Coq via Nix - - env: - - COQ=https://github.com/coq/coq-on-cachix/tarball/master - <<: *NIX - - # Test supported versions of Coq via OPAM - - env: - - COQ_IMAGE=coqorg/coq:dev - - CONTRIB_NAME=coq-bignums - - NJOBS=2 - <<: *OPAM - diff --git a/README.md b/README.md index a3e8ac4..2d81577 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,9 @@ # Bignums -[![Travis][travis-shield]][travis-link] - -[travis-shield]: https://travis-ci.com/coq/bignums.svg?branch=master -[travis-link]: https://travis-ci.com/coq/bignums/builds - - +[![CI](https://github.com/coq/bignums/workflows/CI/badge.svg?branch=master)](https://github.com/coq/bignums/actions?query=workflow%3ACI) Provides BigN, BigZ, BigQ that used to be part of Coq standard library - - ## Meta - Author(s): @@ -45,6 +38,3 @@ make install After installation, the included modules are available under the `Bignums` namespace. - - -