Skip to content

trigger workflow run #151

trigger workflow run

trigger workflow run #151

Workflow file for this run

name: Compared to Nix
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- '**'
- '!**/README*'
push:
branches: [main]
paths:
- '**'
- '!**/README*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests-nix:
runs-on: ubuntu-latest
steps:
- name: Install Nix
uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac
with:
install_url: https://releases.nixos.org/nix/nix-2.15.1/install
nix_path: nixpkgs=channel:nixpkgs-23.05
extra_nix_config: |
experimental-features = nix-command flakes ca-derivations impure-derivations fetch-closure
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = https://cache.nixos.org
trusted-substituters = https://cache.floxdev.com
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= flox-store-public-0:8c/B+kjIaQ+BloCmNkRUKwaVPFWkriSAd0JJvuDu4F0=
max-jobs = auto
cores = 0
substitute = true
builders-use-substitutes = true
fallback = true
connect-timeout = 5
stalled-download-timeout = 90
timeout = 0
allow-import-from-derivation = true
- name: Setup Nix Registry
run: |
set -eu;
set -o pipefail;
nix registry pin nixpkgs github:NixOS/nixpkgs/23.05;
- name: KRB5 pkg-config Test
shell: bash
env:
REPO: ${{ github.repository }}
run: |
set -eu;
set -o pipefail;
if [[ "$GITHUB_REF" == "refs/heads/main" ]]; then
selfURI="github:$REPO";
else
selfURI="github:$REPO/$GITHUB_REF";
fi
echo "selfURI: $selfURI" >&2;
echo "Installing deps" >&2;
nix profile install 'nixpkgs#krb5^out,dev' -L;
nix profile install 'nixpkgs#pkg-config' -L;
nix profile install "$selfURI#etc-profiles" -L;
echo "Activating env" >&2;
export FLOX_ENV="$HOME/.nix-profile";
export LD_FLOXLIB_DEBUG=1;
. "$FLOX_ENV/etc/profile";
echo "Checking if pkg-config can find KRB5" >&2;
if pkg-config --list-all|grep -i 'krb5';
then
echo "PASS" >&2;
exit 0;
else
echo "FAIL" >&2;
echo "pkg-config --list results:" >&2;
echo "---" >&2;
pkg-config --list-all >&2;
echo "---" >&2;
exit 1;
fi