Skip to content

Commit

Permalink
Tag build archives appropriately + use 'macos' instead of 'osx'.
Browse files Browse the repository at this point in the history
  • Loading branch information
KtorZ committed Jul 21, 2024
1 parent a5e73ae commit 5a6cb21
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
build:
strategy:
matrix:
os: [ linux, osx ]
os: [ linux, macos ]
arch: [ x86_64, aarch64 ]
compiler: [ ghc948 ]
exclude:
- os: osx
- os: macos
arch: x86_64

runs-on: ${{ matrix.arch == 'x86_64' && 'ubuntu-latest' || (matrix.os == 'linux' && 'buildjet-4vcpu-ubuntu-2204-arm' || 'macos-latest') }}
Expand All @@ -29,6 +29,11 @@ jobs:
with:
submodules: true

- name: Tag build artifacts
id: tag
run:
echo "value=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT

- name: ❄️ Install Nix
uses: cachix/install-nix-action@v22
with:
Expand Down Expand Up @@ -66,7 +71,7 @@ jobs:
- name: 📎 Upload Artifact
uses: actions/upload-artifact@v3
with:
name: kupo-${{ github.sha }}-${{ matrix.arch }}-${{ matrix.os }}
name: kupo-${{ steps.tag.outputs.value }}-${{ matrix.arch }}-${{ matrix.os }}
path: |
dist/bin
dist/share
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ STYLISH_HASKELL_VERSION := 0.14.5.0
# Default network for snapshots.
NETWORK := preview

OS := $(shell uname -s | sed 's/Linux/linux/' | sed 's/Darwin/osx/')
OS := $(shell uname -s | sed 's/Linux/linux/' | sed 's/Darwin/macos/')
ARCH := $(shell uname -m | sed 's/X86/x86_64/' | sed 's/arm64/aarch64/')
NIX_GHC := $(shell echo $(GHC) | sed 's/^\([0-9]\)\.\([0-9]\)\..*/\1\2/')
NIX_SHELL := github:CardanoSolutions/devx\#ghc$(NIX_GHC)-static-minimal-iog
Expand Down Expand Up @@ -53,7 +53,7 @@ $(OUT)/share/kupo/LICENSE:

$(BIN_DIR_PATH)/kupo:
@nix develop $(NIX_SHELL) $(NIX_OPTS) --command bash -c "cabal build kupo:exe:kupo $(PG_FLAG)"
ifeq ($(OS),osx)
ifeq ($(OS),macos)
@scripts/patch-nix-deps.sh $@
endif

Expand All @@ -70,7 +70,7 @@ $(OUT)/lib:
.SILENT: doc clean clean-all

configure: # Freeze projet dependencies and update package index
ifeq ($(OS),osx)
ifeq ($(OS),macos)
nix develop $(NIX_SHELL) $(NIX_OPTS) --command bash -c "cat /nix/store/l0np941gvmpqcgxankbgb7zpl4mj332v-cabal.project.local >> cabal.project.local"
else
ifeq ($(ARCH),x86_64)
Expand Down

0 comments on commit 5a6cb21

Please sign in to comment.