Skip to content

Commit

Permalink
Use flakes in E2E, remove default.nix, shell.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
Github Action committed Jun 24, 2024
1 parent 9812dc3 commit f4c952a
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 55 deletions.
8 changes: 4 additions & 4 deletions .buildkite/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ env:
steps:
- label: Add release commits
key: add-release-commits
commands: |
./scripts/buildkite/release/release-candidate.sh
commands:
- ./scripts/buildkite/release/release-candidate.sh
agents:
system: x86_64-linux

Expand All @@ -36,8 +36,8 @@ steps:
- add-release-commits
- refresh-node-state
- linux-package
commands: |
./scripts/buildkite/release/linux-e2e.sh
commands:
- nix develop -c ./scripts/buildkite/release/linux-e2e.sh
artifact_paths:
- "./result/linux/**"
- "./logs/**/*"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,4 @@ lib/wallet-benchmarks/data/membench-snapshot

## Local cluster swagger golden actual
lib/local-cluster/data/swagger.json.actual
test/e2e/.direnv/flake-profile*
12 changes: 0 additions & 12 deletions default.nix

This file was deleted.

17 changes: 16 additions & 1 deletion nix/haskell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,17 @@ CHaP: haskell-nix: nixpkgs-recent: nodePkgs: haskell-nix.cabalProject' [
filter = haskell-nix.haskellSourceFilter;
};

shell = {
shell =
let
# To update gemset.nix, run:
# nix-shell --arg bins false --run bundix
gems = pkgs.bundlerEnv {
name = "gems-cardano-wallet-e2e";
gemdir = ../test/e2e;
ruby = pkgs.ruby_3_1;
};
in
{
name = "cardano-wallet-shell${lib.optionalString config.profiling "-profiled"}";
packages = ps: builtins.attrValues (haskellLib.selectProjectPackages ps);
tools = {
Expand All @@ -130,6 +140,11 @@ CHaP: haskell-nix: nixpkgs-recent: nodePkgs: haskell-nix.cabalProject' [
nodePkgs.cardano-node
cardano-addresses-cli.components.exes.cardano-address
bech32.components.exes.bech32
# for e2e tests
gems
gems.wrappedRuby
pkgs.bundix
pkgs.screen
]) ++ (with pkgs.buildPackages.buildPackages; [
just
pkg-config
Expand Down
16 changes: 11 additions & 5 deletions scripts/buildkite/release/fetch-preprod-snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,21 @@ if [ "$failed" ]; then
fi
fi

export failed2=false
curl -o - \
"https://downloads.csnapshots.io/testnet/$(cat file.new)" \
| lz4 -c -d - | tar -x -C .
| lz4 -c -d - | tar -x -C . || export failed2=true

mv file.new file.old
if [ "$failed2" ]; then
echo "Failed to fetch preprod snapshot."
else
echo "Successfully fetched preprod snapshot."
mv file.new file.old

rm -rf db-new
rm -rf db-new

mv db db-new
mv db db-new
fi
else
echo "Failed to fetch preprod snapshot. Hope there is an old one available."
echo "Failed to fetch preprod snapshot name."
fi
5 changes: 2 additions & 3 deletions scripts/buildkite/release/linux-e2e.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env -S nix shell 'nixpkgs#rsync' 'nixpkgs#gnutar' --command bash
#! /usr/bin/env -S nix shell 'nixpkgs#rsync' 'nixpkgs#gnutar' '.#cardano-wallet' --command bash
# shellcheck shell=bash

set -euox pipefail
Expand Down Expand Up @@ -42,7 +42,6 @@ export TESTS_E2E_STATEDIR
TESTS_E2E_TOKEN_METADATA=https://metadata.world.dev.cardano.org/
export TESTS_E2E_TOKEN_METADATA


nix-shell --run "rake run_on[preprod,sync,true]"
rake "run_on[preprod,sync,true]"

rm "$tmpfile"
1 change: 0 additions & 1 deletion shell.nix

This file was deleted.

2 changes: 1 addition & 1 deletion test/e2e/.envrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ else
# to prevent bootstrapping problems.
# It's definitely better to use lorri, because direnv won't
# be fast like this.
use nix
use flake
fi

# Source a user-specific config in .envrc-local at the project
Expand Down
28 changes: 0 additions & 28 deletions test/e2e/shell.nix

This file was deleted.

0 comments on commit f4c952a

Please sign in to comment.