3737 run : mkdir -p out
3838
3939 - name : cmake (macos)
40- run : cmake -S . -B out -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=out/install
40+ run : |
41+ cmake -S . -B out -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=out/install -DCMAKE_OSX_ARCHITECTURES=x86_64
42+ cmake -S . -B out-arm64 -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=out-arm64/install -DCMAKE_OSX_ARCHITECTURES=arm64
4143 if : matrix.os == 'macos-latest'
4244
4345 - name : cmake (win)
@@ -46,10 +48,14 @@ jobs:
4648 if : matrix.os == 'windows-latest'
4749
4850 - name : build
49- run : cmake --build out --config Release --target install
51+ run : cmake --build out -v --config Release --target install
52+
53+ - name : build-arm64
54+ run : cmake --build out-arm64 -v --config Release --target install
55+ if : matrix.os == 'macos-latest'
5056
5157 - name : strip
52- run : find out/install/ -type f -perm -u=x -exec strip -x {} +
58+ run : find out* /install/ -type f -perm -u=x -exec strip -x {} +
5359 if : matrix.os != 'windows-latest'
5460
5561 - name : archive
@@ -60,20 +66,40 @@ jobs:
6066 PKGNAME="binaryen-$VERSION-x86_64-$OSNAME"
6167 TARBALL=$PKGNAME.tar.gz
6268 SHASUM=$PKGNAME.tar.gz.sha256
69+ rm -rf binaryen-$VERSION
6370 mv out/install binaryen-$VERSION
6471 tar -czf $TARBALL binaryen-$VERSION
6572 # on Windows, MSYS2 will strip the carriage return from CMake output
6673 cmake -E sha256sum $TARBALL > $SHASUM
6774 echo "::set-output name=tarball::$TARBALL"
6875 echo "::set-output name=shasum::$SHASUM"
6976
77+ - name : archive-arm64
78+ id : archive-arm64
79+ run : |
80+ OSNAME=$(echo ${{ matrix.os }} | sed 's/-latest//')
81+ VERSION=$GITHUB_REF_NAME
82+ PKGNAME="binaryen-$VERSION-arm64-$OSNAME"
83+ TARBALL=$PKGNAME.tar.gz
84+ SHASUM=$PKGNAME.tar.gz.sha256
85+ rm -rf binaryen-$VERSION
86+ mv out-arm64/install binaryen-$VERSION
87+ tar -czf $TARBALL binaryen-$VERSION
88+ # on Windows, MSYS2 will strip the carriage return from CMake output
89+ cmake -E sha256sum $TARBALL > $SHASUM
90+ echo "::set-output name=tarball::$TARBALL"
91+ echo "::set-output name=shasum::$SHASUM"
92+ if : matrix.os == 'macos-latest'
93+
7094 - name : upload tarball
7195 uses : softprops/action-gh-release@v1
7296 with :
7397 draft : true
7498 files : |
7599 ${{ steps.archive.outputs.tarball }}
76100 ${{ steps.archive.outputs.shasum }}
101+ ${{ steps.archive-arm64.outputs.tarball }}
102+ ${{ steps.archive-arm64.outputs.shasum }}
77103
78104 # Build with gcc 6.3 and run tests on Alpine Linux (inside chroot).
79105 # Note: Alpine uses musl libc.
0 commit comments