Skip to content

WIP: update Device Resources for Compute Capability 8.7 - 9.0 #13

WIP: update Device Resources for Compute Capability 8.7 - 9.0

WIP: update Device Resources for Compute Capability 8.7 - 9.0 #13

Workflow file for this run

name: ci-linux
# Trigger the workflow on push or pull request
on:
pull_request:
# branches: [master]
push:
paths:
- '.github/workflows/ci-linux.yml'
- 'stack*.yaml'
- '*.cabal'
- '*/src/**'
- '*/cbits/**'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ghc:
- "8.10"
- "8.8"
- "8.6"
- "8.4"
- "8.2"
- "8.0"
- "7.8"
cuda:
- "10.2"
- "10.1"
- "10.0"
- "9.2"
- "9.1"
- "9.0"
# include:
# - os: windows-latest
# ghc: "8.10"
# cuda: "10.2.89.20191206"
env:
STACK_FLAGS: "--fast"
HADDOCK_FLAGS: "--haddock --no-haddock-deps --no-haddock-hyperlink-source --haddock-arguments=\"--no-print-missing-docs\""
steps:
- uses: actions/checkout@v2
- run: ln -s stack-${{ matrix.ghc }}.yaml stack.yaml
- uses: actions/cache@v2
with:
path: snapshot.pkgdb
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cuda }}-snapshot.pkgdb
- uses: actions/cache@v2
with:
path: |
~/.local/bin
~/.stack/programs
~/.stack/snapshots
.stack-work
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cuda }}-${{ hashFiles('stack.yaml') }}-${{ hashFiles('snapshot.pkgdb') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cuda }}-${{ hashFiles('stack.yaml') }}-${{ hashFiles('snapshot.pkgdb') }}
${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cuda }}-${{ hashFiles('stack.yaml') }}-
${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cuda }}-
- name: Install stack
run: |
mkdir -p ~/.local/bin
if [[ ! -x ~/.local/bin/stack ]]; then
curl -sL https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
chmod a+x ~/.local/bin/stack
fi
echo "~/.local/bin" >> $GITHUB_PATH
- name: Install GHC
run: stack setup --install-ghc
- name: Install CUDA
run: |
MATRIX_CUDA=${{ matrix.cuda }}
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /"
sudo apt-get update
sudo apt-get -y install cuda-${MATRIX_CUDA/./-}
echo "CUDA_HOME=/usr/local/cuda-${MATRIX_CUDA}" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=/usr/local/cuda-${MATRIX_CUDA}/lib64:$(stack exec ghc -- --print-libdir)/rts:/usr/local/cuda-${MATRIX_CUDA}/nvvm/lib64:${LD_LIBRARY_PATH}" >> $GITHUB_ENV
echo "/usr/local/cuda-${MATRIX_CUDA}/bin" >> $GITHUB_PATH
- name: Build dependencies
run: stack build $STACK_FLAGS --only-dependencies
- name: Build
run: stack build $STACK_FLAGS $HADDOCK_FLAGS
- name: Save snapshot.pkgdb
run: stack exec ghc-pkg -- --package-db=$(stack path --snapshot-pkg-db) list > snapshot.pkgdb