-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test for non macos and fix a bug
- Loading branch information
Showing
5 changed files
with
62 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/sh | ||
# https://github.com/actions/runner-images/issues/7253 | ||
|
||
set -eu | ||
|
||
FAT_BIN=./bin/fat | ||
ARM64_BIN=./bin/arm64 | ||
AMD64_BIN=./bin/amd64 | ||
EXTRACT_BIN=./bin/extract | ||
THIB_BIN=./bin/thin | ||
LIPO_BIN=./bin/lipo | ||
|
||
echo "====building lipo binary" | ||
make | ||
echo "====building base binaries" | ||
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o bin/amd64 example/main.go | ||
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o bin/arm64 example/main.go | ||
|
||
echo "====creating fat" | ||
$LIPO_BIN -output $FAT_BIN -create $ARM64_BIN $AMD64_BIN | ||
$LIPO_BIN $FAT_BIN -verify_arch x86_64 arm64 | ||
|
||
echo "====extracting arm64" | ||
$LIPO_BIN -extract arm64 -output $EXTRACT_BIN $FAT_BIN | ||
$LIPO_BIN $EXTRACT_BIN -verify_arch arm64 | ||
|
||
echo "====thin" | ||
$LIPO_BIN -thin arm64 -output $THIB_BIN $FAT_BIN | ||
$LIPO_BIN $THIB_BIN -verify_arch arm64 | ||
|
||
echo "===replace TODO" | ||
|
||
echo all test pass! |