-
Notifications
You must be signed in to change notification settings - Fork 782
Add Windows 11 arm to ci #7517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add Windows 11 arm to ci #7517
Changes from all commits
033ee95
c8a166a
5d515e6
a0bfb70
89c5bb3
a34728d
e5e72fa
6658bcc
4ae8668
861c270
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ jobs: | |
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-latest, windows-latest] | ||
os: [macos-latest, windows-latest, windows-11-arm] | ||
defaults: | ||
run: | ||
shell: bash | ||
|
@@ -31,7 +31,7 @@ jobs: | |
|
||
- name: install ninja (win) | ||
run: choco install ninja | ||
if: matrix.os == 'windows-latest' | ||
if: startsWith(matrix.os, 'windows') | ||
|
||
- name: mkdir | ||
run: mkdir -p out | ||
|
@@ -47,6 +47,11 @@ jobs: | |
run: cmake -S . -B out -DCMAKE_INSTALL_PREFIX=out/install | ||
if: matrix.os == 'windows-latest' | ||
|
||
- name: cmake (win arm64) | ||
# -G "Visual Studio 15 2017" | ||
run: cmake -S . -B out -DCMAKE_INSTALL_PREFIX=out-arm64/install | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need a different installation directory here? If we don't, can we just reuse the previous step for both windows builders? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need a different installation directory due that being the assumption of the folder name in the archive-arm64 stage of the ci already in place (see https://github.com/mcbarton/binaryen/blob/6658bcc05d2c695a9fc9b5dae8ed623a9dfae9ef/.github/workflows/create_release.yml#L92 ) . The reason its done in this way currently is because you create osx x86 and osx arm64 binaries both from the osx arm64 runners as far as I can tell https://github.com/mcbarton/binaryen/blob/6658bcc05d2c695a9fc9b5dae8ed623a9dfae9ef/.github/workflows/create_release.yml#L41 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got it, thanks 👍 |
||
if: matrix.os == 'windows-11-arm' | ||
|
||
- name: build | ||
run: cmake --build out -v --config Release --target install | ||
|
||
|
@@ -56,7 +61,7 @@ jobs: | |
|
||
- name: strip | ||
run: find out*/install/ -type f -perm -u=x -exec strip -x {} + | ||
if: matrix.os != 'windows-latest' | ||
if: ${{ !startsWith(matrix.os, 'windows') }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was due to me not using startswith much. I didn't know whether I could do the negation of startswith without the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Made change. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Had to revert this change back to what it was previously, as the workflow broke without the brackets |
||
|
||
- name: archive | ||
id: archive | ||
|
@@ -73,11 +78,12 @@ jobs: | |
cmake -E sha256sum $TARBALL > $SHASUM | ||
echo "TARBALL=$TARBALL" >> $GITHUB_OUTPUT | ||
echo "SHASUM=$SHASUM" >> $GITHUB_OUTPUT | ||
if: matrix.os != 'windows-11-arm' | ||
|
||
- name: archive-arm64 | ||
id: archive-arm64 | ||
run: | | ||
OSNAME=$(echo ${{ matrix.os }} | sed 's/-latest//') | ||
OSNAME=$(echo ${{ matrix.os }} | sed 's/-latest//' | sed 's/-11-arm//') | ||
VERSION=$GITHUB_REF_NAME | ||
PKGNAME="binaryen-$VERSION-arm64-$OSNAME" | ||
TARBALL=$PKGNAME.tar.gz | ||
|
@@ -89,7 +95,7 @@ jobs: | |
cmake -E sha256sum $TARBALL > $SHASUM | ||
echo "TARBALL=$TARBALL" >> $GITHUB_OUTPUT | ||
echo "SHASUM=$SHASUM" >> $GITHUB_OUTPUT | ||
if: matrix.os == 'macos-latest' | ||
if: ${{ matrix.os == 'macos-latest' || matrix.os == 'windows-11-arm' }} | ||
|
||
- name: upload tarball | ||
uses: softprops/action-gh-release@v1 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't know whether windows arm was needed for this part of ci. Added for now, and will remove if requested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine to keep.