Skip to content

Add LocalForce and WorldForce subcomponents to apecs-physics #127

Add LocalForce and WorldForce subcomponents to apecs-physics

Add LocalForce and WorldForce subcomponents to apecs-physics #127

Workflow file for this run

name: CI
on:
- push
- pull_request
jobs:
nix-build:
name: Nix build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v19
- name: Build examples
run: nix build -L
- name: Build shell
run: nix develop -L -c echo "All good"
stack-build:
name: Stack ${{ matrix.resolver }} on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest ]
resolver: [ lts-21, lts-20, lts-19, lts-18 ]
include:
- os: macos-latest
resolver: lts-17
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: haskell/actions/setup@v2
with:
enable-stack: true
- uses: actions/cache@v3
if: matrix.os == 'ubuntu-latest' # Stack caching doesn't work and I don't feel like figuring out why
with:
path: |
~/.stack
.stack-work
key: stack-${{ matrix.os }}-${{ matrix.resolver }}-${{ hashFiles('**/*.cabal', 'stack.yaml') }}
- run: sudo apt-get update && sudo apt-get install freeglut3-dev
if: matrix.os == 'ubuntu-latest'
- run: stack build --only-dependencies --resolver ${{ matrix.resolver }}
- run: stack build --resolver ${{ matrix.resolver }}
- run: stack test --resolver ${{ matrix.resolver }}
cabal-build:
name: Cabal GHC ${{ matrix.ghc }} on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ghc: [ '8.8.4', '8.10.7', '9.0.2', '9.2.8', '9.4.5' ]
os: [ ubuntu-latest, macos-latest ]
exclude:
# GHC 8.8.4 is broken on MacOS, see
# https://github.com/jonascarpay/apecs/pull/101#issuecomment-1463759278
# https://gitlab.haskell.org/ghc/ghc/-/issues/18446
- os: macos-latest
ghc: '8.8.4'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: haskell/actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
- uses: actions/cache@v3
with:
path: |
~/.cabal
dist-newstyle
key: cabal-cache-${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal') }}
- run: sudo apt-get update && sudo apt-get install -y freeglut3-dev
if: matrix.os == 'ubuntu-latest'
- run: cabal new-build all --only-dependencies
- run: cabal new-build all
- run: cabal new-test all --test-show-details=direct