fix: install nix before cachix #51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
with: | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- uses: cachix/cachix-action@v12 | |
with: | |
name: data-lens | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
extraPullNames: nix-community | |
# Runs a set of commands using the runners shell | |
- name: setup deps | |
run: | | |
set -x | |
cd | |
nix profile install nixpkgs\#sbcl | |
- name: setup lisp | |
run: | | |
set -x | |
nix profile list | |
export PATH="$HOME/.nix-profile/bin:$PATH" | |
echo $PATH | |
ls ~/.nix-profile/bin | |
sbcl --quit | |
command -v sbcl || exit 36 | |
wget 'https://beta.quicklisp.org/quicklisp.lisp' | |
[[ -f ./quicklisp.lisp ]] || exit 37 | |
sbcl --eval '(require :uiop)' \ | |
--load quicklisp.lisp \ | |
--eval '(handler-case (quicklisp-quickstart:install) (error () (uiop:quit 38)))' \ | |
--quit | |
[[ -f "$HOME"/quicklisp/setup.lisp ]] || exit 39 | |
- name: run tests | |
run: | | |
export PATH="$HOME/.nix-profile/bin:$PATH" | |
cd "$GITHUB_WORKSPACE" | |
ln -s "$GITHUB_WORKSPACE" "$HOME/quicklisp/local-projects" | |
sbcl --disable-debugger --no-userinit \ | |
--load "$HOME/quicklisp/setup.lisp" \ | |
--eval "(mapcar 'asdf:load-asd (directory \"*.asd\"))" \ | |
--eval "(handler-case (ql:quickload :data-lens) (error (c) (format t \"~a\" c) (uiop:quit 42)))" \ | |
--eval "(handler-case (ql:quickload :data-lens/transducers) (error (c) (format t \"~a\" c) (uiop:quit 43)))" \ | |
--eval "(handler-case (ql:quickload :data-lens/test) (error (c) (format t \"~a\" c) (uiop:quit 44)))" \ | |
--eval "(handler-case (asdf:test-system :data-lens) (error (c) (format t \"~a\" c) (uiop:quit 45)))" \ | |
--eval "(handler-case (asdf:test-system :data-lens/transducers) (error (c) (format t \"~a\" c) (uiop:quit 46)))" \ | |
--quit |