Add Windows and macOS Support (#1)
* Re-base onto upstream master * Use os over operating-system per json schema suggestion * Upgrade dependencies * Update action.yml syntax * Restructure repo on latest typescript-action * Update workflow.yml to use same node version as action.yml * Pull in improvements from open PRs. Fix package.json scripts * Type function return arguments * Don't eslint automatic formatting changes * Initial implementation of ghc+cabal install for linux/mac/windows * Update README * Fix cabal version in action.yml * Implement initial simplistic test suite * Test action with CI * Use chocolatey directly to install ghc and cabal * Try pre-installed tool on linux first * Clean up documentation * Expand README * Test super old GHC on ubuntu * Implement support for stack * Update documentation about Stack support * Test stack install in Github Actions CI authored-by: Jared Weakly <jweakly@galois.com>
This commit is contained in:
68
.github/workflows/workflow.yml
vendored
68
.github/workflows/workflow.yml
vendored
@@ -1,26 +1,62 @@
|
||||
name: Main workflow
|
||||
on: [push]
|
||||
jobs:
|
||||
run:
|
||||
name: Run
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
test:
|
||||
name: Test ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest, windows-latest]
|
||||
os: [ubuntu-latest, macOS-latest, windows-latest]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12.x
|
||||
# http://www.tiernok.com/posts/2019/faster-npm-installs-during-ci/
|
||||
- run: npm ci --prefer-offline --no-audit --progress=false
|
||||
- run: npm run pre-push
|
||||
|
||||
- name: Set Node.js 10.x
|
||||
uses: actions/setup-node@master
|
||||
with:
|
||||
node-version: 10.x
|
||||
install-haskell:
|
||||
name: Test GHC Install ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macOS-latest, windows-latest]
|
||||
ghc: ['8.8.3']
|
||||
cabal: ['3.0.0.0']
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
ghc: '7.10.3'
|
||||
cabal: '3.0.0.0'
|
||||
|
||||
- name: npm install
|
||||
run: npm install
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Lint
|
||||
run: npm run format-check
|
||||
- uses: actions/cache@v1
|
||||
if: matrix.os == 'macOS-latest' || matrix.ghc == '7.10.3'
|
||||
with:
|
||||
path: ~/.ghcup
|
||||
key: ${{ runner.os }}-${{ matrix.ghc }}-ghcup
|
||||
|
||||
- name: npm test
|
||||
run: npm test
|
||||
- uses: ./
|
||||
with:
|
||||
ghc-version: ${{ matrix.ghc }}
|
||||
cabal-version: ${{ matrix.cabal }}
|
||||
- run: runhaskell __tests__/hello.hs
|
||||
|
||||
install-stack:
|
||||
name: Test Stack Install ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macOS-latest, windows-latest]
|
||||
stack: ['latest', '1.9.1']
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: ./
|
||||
with:
|
||||
stack-version: ${{ matrix.stack }}
|
||||
stack-no-global: true
|
||||
- run: stack
|
||||
|
||||
Reference in New Issue
Block a user