Skip to content

[CI] Update Nix toolbox #1989

[CI] Update Nix toolbox

[CI] Update Nix toolbox #1989

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
tags: [ "v*.*.*" ]
pull_request:
branches: [ master ]
workflow_dispatch:
inputs:
suite:
description: "Coq OPAM suite"
required: true
default: "released"
type: choice
options:
- released
- extra-dev
env:
OPAM_SUITE: ${{ inputs.suite }}
jobs:
docker:
runs-on: ubuntu-latest # container actions require GNU/Linux
strategy:
matrix:
image:
- 'coqorg/coq:dev'
- 'coqorg/coq:8.20.0'
fail-fast: false # don't stop jobs if one fails
steps:
- uses: actions/checkout@v3
- uses: coq-community/docker-coq-action@v1
with:
opam_file: 'coq-elpi.opam'
custom_image: ${{ matrix.image }}
export: 'OPAMWITHTEST OPAMIGNORECONSTRAINTS OPAMVERBOSE' # space-separated list of variables
env:
OPAMWITHTEST: 'true'
OPAMIGNORECONSTRAINTS: 'coq'
OPAMVERBOSE: '3'
release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
#needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v4
- name: Create archive
run: |
VERSION="${GITHUB_REF_NAME_SLUG#v}"
git archive -o coq-elpi-$VERSION.tar.gz --prefix=coq-elpi-$VERSION/ $GITHUB_SHA .
- name: Release
uses: softprops/action-gh-release@v1
with:
files: coq-elpi-*.tar.gz
fail_on_unmatched_files: true
prerelease: true
generate_release_notes: true
name: Coq-Elpi ${{ github.ref }} for Coq XXX
- name: Use OCaml 4.14.x
uses: avsm/setup-ocaml@v2
with:
ocaml-compiler: 4.14.x
opam-local-packages: |
!coq-elpi.opam
- name: Write PAT
env:
OPAM_PUBLISH_TOKEN: ${{ secrets.OPAM_PUBLISH_TOKEN }}
run: |
mkdir -p ~/.opam/plugins/opam-publish
printf "$OPAM_PUBLISH_TOKEN" > ~/.opam/plugins/opam-publish/coqelpibot.token
- name: Setup SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.BOT_SSH_KEY }}
- name: Install opam-publish # 2.0.3 because more recent versions do not respect OPAMYES
run: opam install -y -j 2 opam-publish=2.0.3
- name: Publish
run: |
eval $(opam env)
git config --global user.name coqelpibot
git config --global user.email [email protected]
TAG=`git tag --sort=-v:refname|head -1`
opam-publish --tag=$TAG --packages-directory=${OPAM_SUITE:-released}/packages --repo=coq/opam --no-browser -v ${TAG##v} coq-elpi.opam https://github.com/LPCIC/coq-elpi/releases/download/$TAG/coq-elpi-${TAG##v}.tar.gz