Skip to content

Commit

Permalink
New lightweight toolbox-based setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zimmi48 committed Aug 6, 2021
1 parent 6f56a8f commit 02331aa
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 38 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/nix-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,22 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
version_or_url:
- 'https://github.com/coq/coq-on-cachix/tarball/master'
coq_version:
- 'master'
fail-fast: false
steps:
- uses: cachix/install-nix-action@v12
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- uses: cachix/cachix-action@v8
with:
# Name of a cachix cache to pull/substitute
name: coq
- uses: cachix/cachix-action@v8
with:
name: coq-community
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- uses: cachix/cachix-action@v8
with:
name: math-comp
- uses: actions/checkout@v2
- run: nix-build --argstr coq-version-or-url "${{ matrix.version_or_url }}"
- run: nix-build https://coq.inria.fr/nix/toolbox --argstr job "aac-tactics" --arg override "{coq = \"${{ matrix.coq_version }}\";}"
67 changes: 67 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# This file was generated from `meta.yml`, please do not edit manually.
# Follow the instructions on https://github.com/coq-community/templates to regenerate.

os: linux
dist: bionic
language: shell

.opam: &OPAM
language: shell
services: docker
install: |
# Prepare the COQ container
docker pull ${COQ_IMAGE}
docker run -d -i --init --name=COQ -v ${TRAVIS_BUILD_DIR}:/home/coq/${PACKAGE} -w /home/coq/${PACKAGE} ${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 pin add ${PACKAGE} . -y -n -k path
opam install ${PACKAGE} -y -j ${NJOBS} --deps-only
opam config list
opam repo list
opam list
"
script:
- echo -e "${ANSI_YELLOW}Building ${PACKAGE}...${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/${PACKAGE}
opam install ${PACKAGE} -v -y -j ${NJOBS}
"
- docker stop COQ # optional
- echo -en 'travis_fold:end:script\\r'

.nix: &NIX
language: nix
nix: 2.3.7
sudo: false
install:
# for cachix we need travis to be a trusted nix user
- echo "trusted-users = $USER" | sudo tee -a /etc/nix/nix.conf
- sudo systemctl restart nix-daemon
- nix-env -iA nixpkgs.cachix
- cachix use coq
- cachix use coq-community
- cachix use math-comp
script:
- nix-build https://coq.inria.fr/nix/toolbox --argstr job "aac-tactics" --arg override "{coq = \"$COQ\";}"
jobs:
include:

# Test supported versions of Coq via Nix
- env:
- COQ=master
<<: *NIX

# Test supported versions of Coq via OPAM
- env:
- COQ_IMAGE=coqorg/coq:dev
- PACKAGE=coq-aac-tactics.dev
- NJOBS=2
<<: *OPAM

31 changes: 0 additions & 31 deletions default.nix

This file was deleted.

4 changes: 1 addition & 3 deletions meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ shortname: aac-tactics
organization: coq-community
community: true
action: true
travis: true
nix: true
plugin: true
doi: 10.1007/978-3-642-25379-9_14
Expand Down Expand Up @@ -55,9 +56,6 @@ supported_ocaml_versions:
text: 4.05.0 or later
opam: '{>= "4.05.0"}'

tested_coq_nix_versions:
- version_or_url: https://github.com/coq/coq-on-cachix/tarball/master

tested_coq_opam_versions:
- version: dev

Expand Down

0 comments on commit 02331aa

Please sign in to comment.