Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
fix: macOS build (#25)
Browse files Browse the repository at this point in the history
`tar` is [broken](actions/runner-images#2619) on macOS. Use `gtar` instead.
  • Loading branch information
Daniel-Bloom-dfinity committed Mar 1, 2022
1 parent b2f19cd commit 0230bff
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/release.yml
@@ -1,5 +1,9 @@
name: Release

# We have to use gtar on macOS because apple's tar is literally broken.
# Yes, I know how stupid that sounds. But it's true:
# https://github.com/actions/virtual-environments/issues/2619

on:
workflow_dispatch:
push:
Expand All @@ -19,14 +23,17 @@ jobs:
target: x86_64-apple-darwin
binary_path: target/release
name: macos
tar: gtar
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
binary_path: target/x86_64-unknown-linux-musl/release
name: linux
tar: tar
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
binary_path: target/x86_64-unknown-linux-gnu/release
name: linux-gnu
tar: tar
steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -78,7 +85,7 @@ jobs:
if: contains(matrix.os, 'macos')

- name: Create tarball of binaries
run: tar -zcC ${{ matrix.binary_path }} -f binaries.tar.gz icx-proxy
run: ${{ matrix.tar }} -zcC ${{ matrix.binary_path }} -f binaries.tar.gz icx-proxy

- name: Inspect input binary and tarball contents
run: |
Expand All @@ -88,8 +95,8 @@ jobs:
ARCHIVE="$(pwd)/binaries.tar.gz"
cd "$(mktemp -d)"
tar --version
tar -xzvf "$ARCHIVE"
${{ matrix.tar }} --version
${{ matrix.tar }} -xzvf "$ARCHIVE"
ls -l icx-proxy
hexdump -C icx-proxy | head
hexdump -C icx-proxy | tail
Expand Down

0 comments on commit 0230bff

Please sign in to comment.