Skip to content

Commit

Permalink
Import executable haskell code (#37)
Browse files Browse the repository at this point in the history
### Changes

- Import the cardano-wallet-exe:exe:cardano-deposit-wallet
- Extract minimal nix setup to create dynamic and static executable for
linux
- Fix the artifacts to not use the shelley wallet package, but package
all assets from scratch
- Pause support for `macos-intel` as not compiling 
- Fix installation instructions, with a hack to be removed on next
release due to executable renaming and flags dropping,
#39
- Remove some docker container leakage
- Imported the `rewrite-libs` tools from iohkNix overlay
- Remove unused overlays
  
### Issues

part of #36

### Notes

#39
  • Loading branch information
paolino authored Feb 25, 2025
2 parents 6e21431 + a553f02 commit 63f4b5c
Show file tree
Hide file tree
Showing 69 changed files with 22,410 additions and 686 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ run/docker/databases
ignore-me
.direnv
tmp
.cabal-fmt-*
172 changes: 103 additions & 69 deletions CI/pipelines/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ steps:
- nix flake check $CI_SCRIPTS_DIR/runmd
agents:
system: ${linux_agent}
- label: Rewrite-libs tool builds
commands:
- nix build $CI_SCRIPTS_DIR/rewrite-libs
agents:
system: ${linux_agent}

- group: Linux Setup
depends_on: []
Expand All @@ -59,14 +64,30 @@ steps:
depends_on:
- linux-setup
steps:
- label: Build Haskell (glibc)
commands:
- nix build .#cardano-deposit-wallet
agents:
system: ${linux_agent}
- label: Build Haskell (musl)
key: linux-static
commands:
- nix build ./code#cardano-deposit-wallet-linux64-static
agents:
system: ${linux_agent}
- label: Build package (linux)
depends_on:
- linux-static
key: linux-package
commands:
- nix build .#linux64.package
artifact_paths:
- ./result/*
agents:
system: ${linux_agent}
- label: Build Docker Image
depends_on:
- linux-package
commands:
- $CI_SCRIPTS_DIR/build-docker-image.sh
artifact_paths:
Expand All @@ -93,9 +114,86 @@ steps:
env:
PACKAGED_FOR: linux64

- group: Docker Tests
depends_on:
- linux-artifacts
steps:
- label: Smoke Test Docker Image
commands:
- $TESTS_SCRIPT $CI_SCRIPTS_DIR/smoke-test-docker-image.sh
artifact_paths:
- ./*.log
agents:
system: ${linux_agent}

- group: MacOS Setup
depends_on: []
key: macos-setup
steps:
- label: Check Nix (macos)
key: macos-nix
commands:
- nix --version
agents:
system: ${macos_agent}

- group: Macos Artifacts
key: macos-artifacts
depends_on:
- macos-setup
steps:

- label: Build Haskell (glibc)
commands:
- nix build .#cardano-deposit-wallet
agents:
system: ${macos_agent}
- label: Build Package (macos-silicon)
commands:
- nix build .#macos-silicon.package
artifact_paths:
- ./result/*
agents:
system: ${macos_agent}

- label: Build Package (macos-intel)
if: 0 == 1
commands:
- nix build --system ${macos_intel} .#macos-intel.package
artifact_paths:
- ./result/*
agents:
system: ${macos_agent}

- group: Macos Tests
depends_on:
- macos-artifacts
steps:
- label: Smoke Test Macos Silicon Package
commands:
- $TESTS_SCRIPT $CI_SCRIPTS_DIR/smoke-test-package.sh
artifact_paths:
- ./*.log
agents:
system: ${macos_agent}
env:
PACKAGED_FOR: macos-silicon

- label: Smoke Test Macos Intel Package
if: 0 == 1
commands:
- nix develop --system ${macos_intel} $CI_DIR#tests --command $CI_SCRIPTS_DIR/smoke-test-package.sh
artifact_paths:
- ./*.log
agents:
system: ${macos_agent}
env:
PACKAGED_FOR: macos-intel

- group: Docs Tests
depends_on:
- linux-setup
- linux-artifacts
- macos-artifacts
steps:
- block: Run Docs Tests
depends_on: []
Expand Down Expand Up @@ -126,6 +224,7 @@ steps:
env:
PACKAGED_FOR: macos-silicon
- label: Test Mithril download (macos-intel)
if: 0 == 1
command: |
$TESTS_SCRIPT $CI_SCRIPTS_DIR/run-md.sh \
$DOCS_TEST_DIR/download-mithril.yml
Expand All @@ -150,7 +249,9 @@ steps:
system: ${macos_agent}
env:
PACKAGED_FOR: macos-silicon
ECHOING: true
- label: Test installation from flake docs (macos-intel)
if: 0 == 1
command: |
export FLAKE=$(pwd)
$TESTS_SCRIPT $CI_SCRIPTS_DIR/run-md.sh \
Expand All @@ -161,6 +262,7 @@ steps:
PACKAGED_FOR: macos-intel
SYSTEM: ${macos_intel}
- label: Test installation from package docs (macos-intel)
if: 0 == 1
command: |
$TESTS_SCRIPT $CI_SCRIPTS_DIR/run-md.sh \
$DOCS_TEST_DIR/download-and-install-package.yml
Expand All @@ -180,71 +282,3 @@ steps:
$DOCS_TEST_DIR/docker-from-flake.yml
agents:
system: ${linux_agent}

- group: Docker Tests
depends_on:
- linux-artifacts
steps:
- label: Smoke Test Docker Image
commands:
- $TESTS_SCRIPT $CI_SCRIPTS_DIR/smoke-test-docker-image.sh
artifact_paths:
- ./*.log
agents:
system: ${linux_agent}

- group: MacOS Setup
depends_on: []
key: macos-setup
steps:
- label: Check Nix (macos)
key: macos-nix
commands:
- nix --version
agents:
system: ${macos_agent}

- group: Macos Artifacts
key: macos-artifacts
depends_on:
- macos-setup
steps:
- label: Build Package (macos-silicon)
commands:
- nix build .#macos-silicon.package
artifact_paths:
- ./result/*
agents:
system: ${macos_agent}

- label: Build Package (macos-intel)
commands:
- nix build --system ${macos_intel} .#macos-intel.package
artifact_paths:
- ./result/*
agents:
system: ${macos_agent}

- group: Macos Tests
depends_on:
- macos-artifacts
steps:
- label: Smoke Test Macos Silicon Package
commands:
- $TESTS_SCRIPT $CI_SCRIPTS_DIR/smoke-test-package.sh
artifact_paths:
- ./*.log
agents:
system: ${macos_agent}
env:
PACKAGED_FOR: macos-silicon

- label: Smoke Test Macos Intel Package
commands:
- nix develop --system ${macos_intel} $CI_DIR#tests --command $CI_SCRIPTS_DIR/smoke-test-package.sh
artifact_paths:
- ./*.log
agents:
system: ${macos_agent}
env:
PACKAGED_FOR: macos-intel
2 changes: 2 additions & 0 deletions CI/scripts/rewrite-libs/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# shellcheck shell=bash
use flake
Loading

0 comments on commit 63f4b5c

Please sign in to comment.