generate GitHub Action file for raco pkg new

This commit is contained in:
xxyzz 2020-11-20 10:32:49 +08:00 committed by Sam Tobin-Hochstadt
parent d88ae7911d
commit 153e417862

View File

@ -124,58 +124,33 @@ compiled/
EOS EOS
))) )))
;; .travis.yml ;; .github/workflows/ci.yml
(with-output-to-file ".travis.yml" (make-directory ".github")
(make-directory ".github/workflows")
(with-output-to-file ".github/workflows/ci.yml"
(lambda () (expand/display #<<EOS (lambda () (expand/display #<<EOS
language: c on: [push, pull_request]
name: CI
# Based on: https://github.com/greghendershott/travis-racket jobs:
build:
env: name: "Build on Racket '${{ matrix.racket-version }}' (${{ matrix.racket-variant }})"
global: runs-on: ubuntu-latest
# Supply a global RACKET_DIR environment variable. This is where strategy:
# Racket will be installed. A good idea is to use ~/racket because fail-fast: false
# that doesn't require sudo to install. matrix:
- RACKET_DIR=~/racket racket-version: ["7.9", "current"]
matrix: racket-variant: ["regular", "CS"]
# Supply at least one RACKET_VERSION environment variable. This is steps:
# used by the install-racket.sh script (run at before_install, - uses: actions/checkout@v2
# below) to select the version of Racket to download and install. - uses: Bogdanp/setup-racket@v0.10
# with:
# Supply more than one RACKET_VERSION (as in the example below) to architecture: x64
# create a Travis-CI build matrix to test against multiple Racket distribution: full
# versions. variant: ${{ matrix.racket-variant }}
- RACKET_VERSION=6.12 version: ${{ matrix.racket-version }}
- RACKET_VERSION=7.0 - run: |
- RACKET_VERSION=7.1 raco pkg install --auto --name <<name>>
- RACKET_VERSION=7.2 raco test -x -p <<name>>
- RACKET_VERSION=HEAD
matrix:
allow_failures:
# - env: RACKET_VERSION=HEAD
fast_finish: true
before_install:
- git clone https://github.com/greghendershott/travis-racket.git ~/travis-racket
- cat ~/travis-racket/install-racket.sh | bash # pipe to bash not sh!
- export PATH="${RACKET_DIR}/bin:${PATH}" #install-racket.sh can't set for us
install:
- raco pkg install --auto --name <<name>>
before_script:
# Here supply steps such as raco make, raco test, etc. You can run
# `raco pkg install --deps search-auto` to install any required
# packages without it getting stuck on a confirmation prompt.
script:
- raco test -x -p <<name>>
after_success:
- raco setup --check-pkg-deps --pkgs <<name>>
- raco pkg install --auto cover cover-coveralls
- raco cover -b -f coveralls -d $TRAVIS_BUILD_DIR/coverage .
EOS EOS
))) )))