diff --git a/.github/workflows/release-upload.yml b/.github/workflows/release-upload.yml index 7fa1022ca9..7d80cea8a3 100644 --- a/.github/workflows/release-upload.yml +++ b/.github/workflows/release-upload.yml @@ -91,7 +91,7 @@ jobs: echo "TARGET_TAG=$target_tag" >> "$GITHUB_ENV" echo "TARGET_TAG=$target_tag" >> "$GITHUB_OUTPUT" - flake_ref="github:${{ github.repository }}/${{ env.TARGET_TAG }}" + flake_ref="github:${{ github.repository }}/$target_tag" echo "FLAKE_REF=$flake_ref" >> "$GITHUB_OUTPUT" echo "DRY_RUN=$dry_run" >> "$GITHUB_OUTPUT" @@ -135,7 +135,7 @@ jobs: strategy: matrix: # TODO generalize - arch: [x86_64-linux, x86_64-darwin, aarch64-darwin] + arch: [x86_64-linux, x86_64-darwin, aarch64-darwin, aarch64-linux] name: "Download Asset" runs-on: ubuntu-latest steps: @@ -153,7 +153,23 @@ jobs: nix flake metadata "${{ needs.wait_for_hydra.outputs.FLAKE_REF }}" --json | jq -r '"LOCKED_URL=\(.url)"' >> "$GITHUB_ENV" - name: Build run: | - derivation="hydraJobs.${{ matrix.arch }}.packages.cardano-cli:exe:cardano-cli" + derivation="hydraJobs." + case ${{ matrix.arch }} in + "x86_64-darwin" | "aarch64-darwin") + derivation+="${{ matrix.arch }}" + ;; + "x86_64-linux") + derivation+="x86_64-linux.x86_64-unknown-linux-musl" + ;; + "aarch64-linux") + derivation+="x86_64-linux.aarch64-unknown-linux-musl" + ;; + *) + echo "Unexpected matrix.arch value: ${{ matrix.arch }}" + exit 1 + ;; + esac + derivation+=".packages.cardano-cli:exe:cardano-cli" nix build --builders "" --max-jobs 0 ${{ env.LOCKED_URL }}#$derivation tree result cp result/bin/cardano-cli cardano-cli-${{ matrix.arch }} # (1) @@ -178,7 +194,7 @@ jobs: # (2) # TARGET_TAG is of the form cardano-cli-8.22.0, so we don't need to prefix the tar.gz's name # with cardano-cli - for arch in x86_64-linux x86_64-darwin aarch64-darwin; do + for arch in x86_64-linux x86_64-darwin aarch64-darwin aarch64-linux; do tar -czf ${{ needs.wait_for_hydra.outputs.TARGET_TAG }}-$arch.tar.gz cardano-cli-$arch done # TODO generalize @@ -186,7 +202,7 @@ jobs: - name: Checksums run: | # (3) - for arch in x86_64-linux x86_64-darwin aarch64-darwin; do + for arch in x86_64-linux x86_64-darwin aarch64-darwin aarch64-linux; do sha256sum ${{ needs.wait_for_hydra.outputs.TARGET_TAG }}-$arch.tar.gz >> ${{ needs.wait_for_hydra.outputs.TARGET_TAG }}-sha256sums.txt done - name: Create short tag @@ -213,5 +229,6 @@ jobs: ${{ needs.wait_for_hydra.outputs.TARGET_TAG }}-x86_64-linux.tar.gz ${{ needs.wait_for_hydra.outputs.TARGET_TAG }}-x86_64-darwin.tar.gz ${{ needs.wait_for_hydra.outputs.TARGET_TAG }}-aarch64-darwin.tar.gz + ${{ needs.wait_for_hydra.outputs.TARGET_TAG }}-aarch64-linux.tar.gz ${{ needs.wait_for_hydra.outputs.TARGET_TAG }}-sha256sums.txt body_path: RELEASE_CHANGELOG.md diff --git a/cabal.project b/cabal.project index f4bc98a779..12ae24805f 100644 --- a/cabal.project +++ b/cabal.project @@ -36,6 +36,17 @@ if os(windows) constraints: time ^>=1.14 allow-newer: *:time +constraints: any.text source +-- Depending on C++ for just so slightly faster utf8 parsing is a bit annoying +-- especially as it brings in all kinds of complications for GHC. +package text + flags: -simdutf + +-- formatting (>= 7.2) allows us do drop double-conversion (which again is one +-- of the offending c++ dependencies) +package formatting + flags: +no-double-conversion + tests: True test-show-details: direct diff --git a/flake.nix b/flake.nix index f308ee5269..b4086a9794 100644 --- a/flake.nix +++ b/flake.nix @@ -85,8 +85,13 @@ # we also want cross compilation to windows on linux (and only with default compiler). crossPlatforms = p: - lib.optional (system == "x86_64-linux" && config.compiler-nix-name == mingwVersion) - p.mingwW64; + lib.optionals (system == "x86_64-linux" && config.compiler-nix-name == mingwVersion) + [ + p.mingwW64 # x86_64-windows + p.aarch64-multiplatform-musl # aarch64-linux (static) + p.musl64 # x86_64-linux (static) + + ]; # CHaP input map, so we can find CHaP packages (needs to be more # recent than the index-state we set!). Can be updated with