Skip to content

Commit

Permalink
Trying to use latest brew-pkg version.
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga committed Sep 4, 2024
1 parent ba0abb3 commit e62ac39
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ jobs:
name: metacall-tarball-${{ matrix.triplet.arch }}
path: release/*

test-pkg:
pkg-test:
name: Test Tarball PKG
needs: build
strategy:
fail-fast: false
matrix:
triplet: [
{os: macos-13, arch: amd64},
{os: macos-14, arch: arm64}
{os: macos-13, arch: amd64, install: "/usr/local"},
{os: macos-14, arch: arm64, install: "/opt/homebrew"}
]
runs-on: ${{ matrix.triplet.os }}
steps:
Expand All @@ -113,7 +113,9 @@ jobs:

# Test the package in a clean environment
- name: Test
run: ./test.sh
run: |
export PATH="${{ matrix.triplet.install }}/bin:$PATH"
./test.sh
# Release package
- name: Release
Expand All @@ -124,15 +126,15 @@ jobs:
files: |
metacall-tarball-macos-${{ matrix.triplet.arch }}.pkg
test-tgz:
tgz-test:
name: Test Tarball TGZ
needs: build
strategy:
fail-fast: false
matrix:
triplet: [
{os: macos-13, arch: amd64},
{os: macos-14, arch: arm64}
{os: macos-13, arch: amd64, install: "/usr/local"},
{os: macos-14, arch: arm64, install: "/opt/homebrew"}
]
runs-on: ${{ matrix.triplet.os }}
steps:
Expand All @@ -154,7 +156,9 @@ jobs:
run: |
mkdir distributable
tar -xvzf metacall-tarball-macos-${{ matrix.triplet.arch }}.tgz -C `pwd`/distributable
export PATH="`pwd`/distributable/bin:$PATH"
sudo cp -R `pwd`/distributable${{ matrix.triplet.install }}/ ${{ matrix.triplet.install }}/
rm -rf `pwd`/distributable
export PATH="${{ matrix.triplet.install }}/bin:$PATH"
./test.sh
# Release package
Expand All @@ -168,7 +172,7 @@ jobs:
install-test:
name: Trigger Install Test Workflow
needs: [test-pkg, test-tgz]
needs: [pkg-test, tgz-test]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
Expand Down
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ METACALL_ARCH=`architecture`
mkdir release
brew tap --verbose metacall/brew-pkg
brew install --verbose --HEAD metacall/brew-pkg/brew-pkg
brew pkg --with-deps --compress metacall
mv metacall-${METACALL_VERSION}.pkg release/metacall-tarball-macos-${METACALL_ARCH}.pkg
mv metacall-${METACALL_VERSION}.tgz release/metacall-tarball-macos-${METACALL_ARCH}.tgz
brew pkg --name metacall --relocatable --compress --additional-deps [email protected],[email protected] metacall
mv metacall.pkg release/metacall-tarball-macos-${METACALL_ARCH}.pkg
mv metacall.tgz release/metacall-tarball-macos-${METACALL_ARCH}.tgz
8 changes: 5 additions & 3 deletions test.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#!/bin/sh

export DYLD_PRINT_LIBRARIES=1
export DYLD_PRINT_LIBRARIES_POST_LAUNCH=1
export DYLD_PRINT_RPATHS=1
# Debug
# export DYLD_PRINT_LIBRARIES=1
# export DYLD_PRINT_LIBRARIES_POST_LAUNCH=1
# export DYLD_PRINT_RPATHS=1

repl_test() {
echo "$1"
TEST_COMMAND="`echo $2 | metacall`"
if echo "$TEST_COMMAND" | grep -q "$3"; then
echo "$TEST_COMMAND"
echo "Passed"
else
echo "Failed"
Expand Down

0 comments on commit e62ac39

Please sign in to comment.