Skip to content

Commit df4285e

Browse files
authored
Add Windows 11 arm to CI (#7517)
Windows arm Github runners are now available for free for public repositories.
1 parent cdcf62b commit df4285e

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
runs-on: ${{ matrix.os }}
5252
strategy:
5353
matrix:
54-
os: [ubuntu-latest, macos-latest, windows-latest]
54+
os: [ubuntu-latest, macos-latest, windows-latest, windows-11-arm]
5555
steps:
5656
- uses: actions/setup-python@v5
5757
with:
@@ -77,7 +77,7 @@ jobs:
7777

7878
- name: install ninja (win)
7979
run: choco install ninja
80-
if: matrix.os == 'windows-latest'
80+
if: startsWith(matrix.os, 'windows')
8181

8282
- name: install v8
8383
run: |
@@ -98,7 +98,7 @@ jobs:
9898
- name: cmake (win)
9999
# -G "Visual Studio 15 2017"
100100
run: cmake -S . -B out -DCMAKE_INSTALL_PREFIX=out/install
101-
if: matrix.os == 'windows-latest'
101+
if: startsWith(matrix.os, 'windows')
102102

103103
- name: build
104104
run: cmake --build out --config Release -v
@@ -108,7 +108,7 @@ jobs:
108108

109109
- name: strip
110110
run: find out/install/ -type f -perm -u=x -exec strip -x {} +
111-
if: matrix.os != 'windows-latest'
111+
if: ${{ !startsWith(matrix.os, 'windows') }}
112112

113113
- name: Upload artifacts
114114
uses: actions/upload-artifact@v4

.github/workflows/create_release.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ${{ matrix.os }}
1717
strategy:
1818
matrix:
19-
os: [macos-latest, windows-latest]
19+
os: [macos-latest, windows-latest, windows-11-arm]
2020
defaults:
2121
run:
2222
shell: bash
@@ -31,7 +31,7 @@ jobs:
3131

3232
- name: install ninja (win)
3333
run: choco install ninja
34-
if: matrix.os == 'windows-latest'
34+
if: startsWith(matrix.os, 'windows')
3535

3636
- name: mkdir
3737
run: mkdir -p out
@@ -47,6 +47,11 @@ jobs:
4747
run: cmake -S . -B out -DCMAKE_INSTALL_PREFIX=out/install
4848
if: matrix.os == 'windows-latest'
4949

50+
- name: cmake (win arm64)
51+
# -G "Visual Studio 15 2017"
52+
run: cmake -S . -B out -DCMAKE_INSTALL_PREFIX=out-arm64/install
53+
if: matrix.os == 'windows-11-arm'
54+
5055
- name: build
5156
run: cmake --build out -v --config Release --target install
5257

@@ -56,7 +61,7 @@ jobs:
5661

5762
- name: strip
5863
run: find out*/install/ -type f -perm -u=x -exec strip -x {} +
59-
if: matrix.os != 'windows-latest'
64+
if: ${{ !startsWith(matrix.os, 'windows') }}
6065

6166
- name: archive
6267
id: archive
@@ -73,11 +78,12 @@ jobs:
7378
cmake -E sha256sum $TARBALL > $SHASUM
7479
echo "TARBALL=$TARBALL" >> $GITHUB_OUTPUT
7580
echo "SHASUM=$SHASUM" >> $GITHUB_OUTPUT
81+
if: matrix.os != 'windows-11-arm'
7682

7783
- name: archive-arm64
7884
id: archive-arm64
7985
run: |
80-
OSNAME=$(echo ${{ matrix.os }} | sed 's/-latest//')
86+
OSNAME=$(echo ${{ matrix.os }} | sed 's/-latest//' | sed 's/-11-arm//')
8187
VERSION=$GITHUB_REF_NAME
8288
PKGNAME="binaryen-$VERSION-arm64-$OSNAME"
8389
TARBALL=$PKGNAME.tar.gz
@@ -89,7 +95,7 @@ jobs:
8995
cmake -E sha256sum $TARBALL > $SHASUM
9096
echo "TARBALL=$TARBALL" >> $GITHUB_OUTPUT
9197
echo "SHASUM=$SHASUM" >> $GITHUB_OUTPUT
92-
if: matrix.os == 'macos-latest'
98+
if: ${{ matrix.os == 'macos-latest' || matrix.os == 'windows-11-arm' }}
9399

94100
- name: upload tarball
95101
uses: softprops/action-gh-release@v1

0 commit comments

Comments
 (0)