-
Notifications
You must be signed in to change notification settings - Fork 46
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
Add Windows optimized workflow #79
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,10 +13,21 @@ jobs: | |
run: dnf install -y gtk3-devel zip | ||
- name: Build | ||
run: ./make-linux.sh | ||
- name: Zip to Archive | ||
run: zip -9 ./linux-x64.zip ./flips | ||
- name: Upload Artifacts | ||
uses: actions/[email protected] | ||
with: | ||
name: linux-x64-gui.zip | ||
path: ./linux-x64.zip | ||
path: ./flips | ||
|
||
|
||
windows: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build | ||
run: bash ./make-windows.sh | ||
- name: Upload Artifacts | ||
uses: actions/[email protected] | ||
with: | ||
name: windows-x64-gui.zip | ||
path: ./flips.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/sh | ||
|
||
# For whatever reason, Windows sometimes has LANG unset. This breaks grep at the end, so setting this manually. | ||
export LANG=C.UTF-8 | ||
|
||
echo "This script creates a heavily optimized Windows binary. For debugging you're better off using the Makefile directly." | ||
|
||
# Set GCC specific optimization flags. These may need to be revisited when the project is build using MVSC. | ||
FLAGS='-Wall -O3 -flto -fuse-linker-plugin -fomit-frame-pointer -fmerge-all-constants -fvisibility=hidden' | ||
FLAGS=$FLAGS' -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables' | ||
FLAGS=$FLAGS' -ffunction-sections -fdata-sections -Wl,--gc-sections -fprofile-dir=obj/' | ||
|
||
|
||
rm floating.zip | ||
rm -r obj/* || true | ||
|
||
#if trying to make a 32bit Flips, add -Wl,--large-address-aware | ||
|
||
echo 'Windows (1/3)' | ||
rm -r obj/* flips.exe; make CFLAGS="$FLAGS -fprofile-generate -lgcov" | ||
[ -e flips.exe ] || exit | ||
echo 'Windows (2/3)' | ||
./flips.exe --create --bps-delta profile/firefox-10.0esr.tar profile/firefox-17.0esr.tar /dev/null | ||
./flips.exe --create --bps-delta-moremem profile/firefox-10.0esr.tar profile/firefox-17.0esr.tar /dev/null | ||
echo 'Windows (3/3)' | ||
rm flips.exe; make CFLAGS="$FLAGS -fprofile-use -s" | ||
|
||
|
||
#verify that there are no unexpected dependencies | ||
objdump -p flips.exe | grep 'DLL Name' | \ | ||
grep -Pvi '(msvcrt|advapi32|comctl32|comdlg32|gdi32|kernel32|shell32|user32|api-ms-win-crt)' && \ | ||
echo "Invalid dependency" && exit 1 | ||
|
||
exit 0 | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Wonder if -fvisibility=hidden does anything on Windows, it's a pretty Unix-y flag.
But it doesn't error out, so let's keep it.