Skip to content

Document nix installation (#1344) #2145

Document nix installation (#1344)

Document nix installation (#1344) #2145

Workflow file for this run

name: Benchmarks
on: [push]
jobs:
benchmarks:
name: benchmarks
runs-on: ubuntu-latest
container: fossa/haskell-static-alpine:ghc-9.4.7
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: actions/checkout@v3
with:
lfs: true
- name: Ensures git ownership check does not lead to compile error (we run git during compile for version tagging, etc.)
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
# adduser cannot add users to group: https://unix.stackexchange.com/a/397733
# so we edit /etc/group directly
- name: Create nixbuild users/group
run: |
addgroup nixbld
adduser -D nixbld-1
adduser -D nixbld-2
adduser -D nixbld-3
sed 's/nixbld:x:\([[:digit:]]*\):$/nixbld:x:\1:nixbld-1,nixbld-2,nixbld-3/' /etc/group > group-changed
mv group-changed /etc/group
- name: run our custom nix install script
run : ./.github/scripts/install-nix.sh
shell: bash
env:
INPUT_NIX_PATH: "nixpkgs=channel:nixos-unstable"
INPUT_EXTRA_NIX_CONFIG: "build-users-group = nixbld"
INPUT_INSTALL_URL: ""
INPUT_INSTALL_OPTIONS: ""
- name: Debugging information
run: |
ghc --version || echo "no ghc"
cabal --version || echo "no cabal"
ghcup --version || echo "no ghcup"
rustc -V || echo "no rustc"
cargo -V || echo "no cargo"
- uses: Swatinem/rust-cache@v2
- uses: actions/cache@v3
name: Cache cabal store
with:
path: ${{ steps.setup-haskell.outputs.cabal-store || '~/.local/state/cabal' }}
key: ${{ runner.os }}-benchmarks-cabal-cache-${{ hashFiles('**/*.cabal', 'cabal.project.ci.linux') }}
restore-keys: |
${{ runner.os }}-benchmarks-cabal-cache-
${{ runner.os }}-benchmarks-
${{ runner.os }}-
- name: Build Rust dependencies
run: cargo build --release
- name: Update vendored binaries
run: |
mkdir vendor-bins
./vendor_download.sh
env:
GITHUB_TOKEN: ${{ secrets.BASIS_ACCESS_TOKEN }}
- name: Build
env:
RUN_CMD: cabal build benchmarks
run: |
cabal update
$RUN_CMD || $RUN_CMD
- name: Bench
run: |
cabal bench --benchmark-options '+RTS -T'