37
37
run : mkdir -p out
38
38
39
39
- 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
41
43
if : matrix.os == 'macos-latest'
42
44
43
45
- name : cmake (win)
@@ -46,10 +48,14 @@ jobs:
46
48
if : matrix.os == 'windows-latest'
47
49
48
50
- 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'
50
56
51
57
- 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 {} +
53
59
if : matrix.os != 'windows-latest'
54
60
55
61
- name : archive
@@ -60,20 +66,40 @@ jobs:
60
66
PKGNAME="binaryen-$VERSION-x86_64-$OSNAME"
61
67
TARBALL=$PKGNAME.tar.gz
62
68
SHASUM=$PKGNAME.tar.gz.sha256
69
+ rm -rf binaryen-$VERSION
63
70
mv out/install binaryen-$VERSION
64
71
tar -czf $TARBALL binaryen-$VERSION
65
72
# on Windows, MSYS2 will strip the carriage return from CMake output
66
73
cmake -E sha256sum $TARBALL > $SHASUM
67
74
echo "::set-output name=tarball::$TARBALL"
68
75
echo "::set-output name=shasum::$SHASUM"
69
76
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
+
70
94
- name : upload tarball
71
95
uses : softprops/action-gh-release@v1
72
96
with :
73
97
draft : true
74
98
files : |
75
99
${{ steps.archive.outputs.tarball }}
76
100
${{ steps.archive.outputs.shasum }}
101
+ ${{ steps.archive-arm64.outputs.tarball }}
102
+ ${{ steps.archive-arm64.outputs.shasum }}
77
103
78
104
# Build with gcc 6.3 and run tests on Alpine Linux (inside chroot).
79
105
# Note: Alpine uses musl libc.
0 commit comments