Skip to content

Commit

Permalink
Build executables for arm64 platforms as well
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigozr committed Sep 25, 2023
1 parent eadaf80 commit 5c8e511
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 37 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/node.js.yml
Expand Up @@ -42,8 +42,11 @@ jobs:
with:
files: |
build/sqs-grep-linux-x64.tbz
build/sqs-grep-linux-arm64.tbz
build/sqs-grep-macos-x64.tbz
build/sqs-grep-macos-arm64.tbz
build/sqs-grep-win-x64.zip
build/sqs-grep-win-arm64.zip
# Publish to NPM Registry
- name: Publish to NPM Registry
Expand Down
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

43 changes: 28 additions & 15 deletions build/build.sh
@@ -1,22 +1,35 @@
#!/bin/sh
rm sqs-grep sqs-grep.exe sqs-grep-* > /dev/null 2> /dev/null
echo Bulding executables...
pkg ../ --public -t node18-linux-x64,node18-macos-x64,node18-win-x64 || exit 1
pkg ../ --public -t node18-linux-x64,node18-linux-arm64,node18-macos-x64,node18-macos-arm64,node18-win-x64,node18-win-arm64 || exit 1

# Linux
echo Packaging Linux x64 binary...
mv sqs-grep-linux sqs-grep || exit 1
tar -cjf sqs-grep-linux-x64.tbz sqs-grep || exit 1
rm sqs-grep || exit 1
pack_unix()
{
FILE=$1
TARGET=$2
echo Packaging $FILE binary as $TARGET...
mv $FILE sqs-grep || exit 1
tar -cjf $TARGET sqs-grep || exit 1
rm sqs-grep || exit 1
}

# MacOS
echo Packaging MacOS x64 binary...
mv sqs-grep-macos sqs-grep || exit 1
tar -cjf sqs-grep-macos-x64.tbz sqs-grep || exit 1
rm sqs-grep || exit 1
pack_win()
{
FILE=$1
TARGET=$2
echo Packaging $FILE binary as $TARGET...
mv $FILE sqs-grep.exe || exit 1
zip -9 $TARGET sqs-grep.exe || exit 1
rm sqs-grep.exe || exit 1
}


# Linux and MacOS
pack_unix sqs-grep-linux-x64 sqs-grep-linux-x64.tbz
pack_unix sqs-grep-linux-arm64 sqs-grep-linux-arm64.tbz
pack_unix sqs-grep-macos-x64 sqs-grep-macos-x64.tbz
pack_unix sqs-grep-macos-arm64 sqs-grep-macos-arm64.tbz

# Windows
echo Packaging Windows x64 binary...
mv sqs-grep-win.exe sqs-grep.exe || exit 1
zip -9 sqs-grep-win-x64.zip sqs-grep.exe || exit 1
rm sqs-grep.exe || exit 1
pack_win sqs-grep-win-x64.exe sqs-grep-win-x64.zip
pack_win sqs-grep-win-arm64.exe sqs-grep-win-arm64.zip

0 comments on commit 5c8e511

Please sign in to comment.