name: CI on: [push, pull_request] env: CI: "ON" # We can detect this in the build system and other vendors implement it HOMEBREW_NO_ANALYTICS: "ON" # Make Homebrew installation a little quicker HOMEBREW_NO_AUTO_UPDATE: "ON" HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: "ON" HOMEBREW_NO_GITHUB_API: "ON" HOMEBREW_NO_INSTALL_CLEANUP: "ON" RUST_BACKTRACE: "full" # Make Rust print full backtrace on error jobs: Build: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] gcc_v: [9] # Version of GFortran we want to use. env: FC: gfortran GCC_V: ${{ matrix.gcc_v }} steps: - name: Checkout code uses: actions/checkout@v1 - name: Install Haskell Linux / macOS if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos') uses: mstksg/setup-stack@v1 - name: Install Haskell Windows if: contains(matrix.os, 'windows') run: | wget https://get.haskellstack.org/stable/windows-x86_64.zip unzip windows-x86_64.zip copy windows-x86_64\stack.exe %APPDATA%\local\bin - name: Install GFortran Linux if: contains(matrix.os, 'ubuntu') run: | sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \ --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \ --slave /usr/bingcov gcov /usr/bin/gcov-${GCC_V} - name: Build run: | stack build - name: Run tests run: | stack test