Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplify drv #8

Merged
merged 27 commits into from
Jun 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 17 additions & 12 deletions .github/workflows/compare-nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,22 @@ on:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
#cancel-in-progress: true
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Install Nix
uses: cachix/install-nix-action@11f4ad19be46fd34c005a2864996d8f197fb51c6
uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac
with:
install_url: https://releases.nixos.org/nix/nix-2.16.1/install
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
experimental-features = nix-command flakes ca-derivations impure-derivations fetch-closure
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = https://cache.nixos.org
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
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
Expand All @@ -37,6 +38,7 @@ jobs:
connect-timeout = 5
stalled-download-timeout = 90
timeout = 0
allow-import-from-derivation = true

- name: Setup Nix Registry
run: |
Expand All @@ -46,25 +48,28 @@ jobs:

- name: SQLite3 pkg-config Test
shell: bash
env:
REPO: ${{ github.repository }}
#FLOX_NOSET_LD_AUDIT: 1
run: |
set -eu;
set -o pipefail;
_ec=0;
trap '_ec="$?"; echo "ERROR: code $_ec" >&2; exit "$_ec";' HUP TERM INT;

if [[ "$GITHUB_REF" == "refs/heads/main" ]]; then
selfURI="github:${{ github.repository }}";
selfURI="github:$REPO";
else
selfURI="github:${{ github.repository }}/$GITHUB_REF";
selfURI="github:$REPO/$GITHUB_REF";
fi
echo "selfURI: $selfURI" >&2;

echo "Installing deps" >&2;
nix profile install 'nixpkgs#sqlite^bin,out,dev';
nix profile install 'nixpkgs#pkg-config';
nix profile install "$selfURI#etc-profiles";
nix profile install 'nixpkgs#sqlite^bin,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 sqlite" >&2;
Expand Down
12 changes: 1 addition & 11 deletions .github/workflows/trivial-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
#cancel-in-progress: true
jobs:
tests:
runs-on: ubuntu-latest
Expand All @@ -40,20 +40,10 @@ jobs:
run: |
set -eu;
set -o pipefail;
_ec=0;
trap '_ec="$?"; echo "ERROR: code $_ec" >&2; exit "$_ec";' HUP TERM INT;

echo "Creating sqlite-dev" >&2;
flox create -e sqlite-dev;

trap '
_ec="$?";
echo "ERROR: code $_ec" >&2;
flox destroy -e sqlite-dev;
exit "$_ec";
' HUP TERM INT;
trap '_ec="$?"; flox destroy -e sqlite-dev; exit "$_ec";' EXIT;

echo "Creating flox.nix" >&2;
cat <<'EOF' > ./flox.nix
{
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/.flox
result
result-*
Loading
Loading