Streaming HTML search results #243
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: Build & test in nix-shell | |
on: | |
push: | |
pull_request: | |
jobs: | |
build_init: | |
strategy: | |
matrix: | |
os: [ubuntu-22.04, ubuntu-20.04, macos-13, macos-12] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Nix | |
uses: cachix/install-nix-action@v25 | |
with: | |
install_url: https://releases.nixos.org/nix/nix-2.13.3/install | |
extra_nix_config: | | |
substituters = https://cache.nixos.org https://cache.iog.io | |
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= | |
system-features = benchmark big-parallel kvm nixos-test | |
- name: Cache cabal stuff | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cabal/packages | |
~/.cabal/store | |
dist-newstyle | |
key: ${{ runner.os }}-${{ hashFiles('**/*.cabal', '**/cabal.project', '**/cabal.project.freeze') }} | |
restore-keys: ${{ runner.os }}- | |
# Fixes error: | |
# Detected Bash version that isn't supported by Nixpkgs (3.2.57(1)-release) | |
# Please install Bash 4 or greater to continue. | |
- name: Install Bash | |
run: | | |
nix-env -i --from-expression '_: (import ./nix/pkgs.nix).pkgs.bash' | |
- name: Test nix-shell | |
run: nix-shell --run "echo 'it works \o/'" | |
- name: Run TODO.sh | |
run: nix-shell --run "./TODO.sh" | |
- name: Run 'cabal update' | |
run: nix-shell --run "cabal update" | |
- name: Build 'function-graph' library | |
run: nix-shell --run "cabal build lib:function-graph" | |
- name: Build 'function-graph-server' library | |
run: nix-shell --run "cabal build lib:function-graph-server" | |
- name: Build 'test-unit' test suite | |
run: nix-shell --run "cabal build test-suite:test-unit" | |
- name: Run 'test-unit' test suite | |
run: nix-shell --run "cabal test test-suite:test-unit --test-show-details=direct" | |
- name: Build 'test-web' test suite | |
run: nix-shell --run "cabal build exe:test-web" | |
- name: Run 'test-web' test suite | |
run: nix-shell --run "cabal run exe:test-web --test-show-details=direct" | |
- name: Build benchmark-lib | |
run: nix-shell --run "cabal build bench:benchmark-lib" | |
- name: Run benchmark-lib | |
run: nix-shell --run "cabal run bench:benchmark-lib" | |
- name: Build benchmark-web | |
run: nix-shell --run "cabal build bench:benchmark-web" | |
- name: Run benchmark-web | |
run: nix-shell --run "cabal run bench:benchmark-web" | |
- name: Build 'function-graph' executable | |
run: nix-shell --run "cabal build exe:function-graph" | |
- name: Build 'server' executable | |
run: nix-shell --run "cabal build exe:server" |