Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions .github/workflows/build-basilisk-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Build Basilisk Windows

on:
pull_request:
workflow_dispatch:
# push:
# branches:
# - master
# - release

jobs:
build-basilisk-windows:
name: Build Basilisk ${{ matrix.config.name }}
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
config:
- name: Windows-Win64
win: win64
arch: x86_64

- name: Windows-Win32
win: win32
arch: i686

steps:
- name: List available VC Redist folders (for debugging)
run: tree /f "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\redist"

- name: Install MozillaBuild
run: |
Invoke-WebRequest -Uri https://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-3.4.exe -OutFile MozillaBuildSetup-3.4.exe
.\MozillaBuildSetup-3.4.exe /S /v/qn | Write-Output
del .\MozillaBuildSetup-3.4.exe
shell: pwsh

- uses: ChristopheLav/windows-sdk-install@v1
with:
version-sdk: ${{ matrix.config.arch == 'x86_64' && '26100' || '22621' }}
features: "OptionId.DesktopCPPx64,OptionId.DesktopCPPx86"

- name: Install NASM into MozillaBuild
run: |
Invoke-WebRequest -Uri https://www.nasm.us/pub/nasm/releasebuilds/3.01/win64/nasm-3.01-win64.zip -OutFile nasm-3.01-win64.zip
Expand-Archive -Path nasm-3.01-win64.zip -DestinationPath nasm-3.01-win64 -Force
Get-ChildItem -Path nasm-3.01-win64 -Filter *.exe -Recurse | Copy-Item -Destination C:\mozilla-build\bin -Force
C:\mozilla-build\start-shell.bat nasm -v
shell: pwsh

- name: Checkout eUXP
uses: actions/checkout@v6
with:
path: euxp
repository: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
submodules: recursive

- name: Clone Basilisk and insert eUXP platform
run: |
git clone -b euxp https://repo.palemoon.org/Basilisk-Dev/Basilisk basilisk
Remove-Item -Recurse -Force .\basilisk\platform
Move-Item -Path .\euxp -Destination .\basilisk\platform
shell: pwsh

- name: Copy mozconfig
run: Copy-Item .\basilisk\platform\.github\workflows\build-basilisk-windows\mozconfig-${{ matrix.config.win }} -Destination .\basilisk\.mozconfig
shell: pwsh

- name: debug dirs
run: |
C:\mozilla-build\start-shell.bat echo '/c'
C:\mozilla-build\start-shell.bat ls /c
C:\mozilla-build\start-shell.bat echo '/c/a'
C:\mozilla-build\start-shell.bat ls /c/a
C:\mozilla-build\start-shell.bat echo '/d'
C:\mozilla-build\start-shell.bat ls /d
C:\mozilla-build\start-shell.bat echo '/d/a'
C:\mozilla-build\start-shell.bat ls /d/a
C:\mozilla-build\start-shell.bat echo '/d/a/eUXP'
C:\mozilla-build\start-shell.bat ls '/d/a/eUXP'

- name: mach configure
run: |
C:\mozilla-build\start-shell.bat /d/a/${{ github.event.repository.name }}/${{ github.event.repository.name }}/basilisk/platform/.github/workflows/build-basilisk-windows/mach-passthrough-windows.sh /d/a/${{ github.event.repository.name }}/${{ github.event.repository.name }}/basilisk configure
shell: pwsh

- name: mach build
run: |
C:\mozilla-build\start-shell.bat /d/a/${{ github.event.repository.name }}/${{ github.event.repository.name }}/basilisk/platform/.github/workflows/build-basilisk-windows/mach-passthrough-windows.sh /d/a/${{ github.event.repository.name }}/${{ github.event.repository.name }}/basilisk build
shell: pwsh

- name: mach package
run: |
C:\mozilla-build\start-shell.bat /d/a/${{ github.event.repository.name }}/${{ github.event.repository.name }}/basilisk/platform/.github/workflows/build-basilisk-windows/mach-passthrough-windows.sh /d/a/${{ github.event.repository.name }}/${{ github.event.repository.name }}/basilisk package
shell: pwsh

- name: mach installer if release branch
shell: pwsh
run: |
C:\mozilla-build\start-shell.bat /d/a/${{ github.event.repository.name }}/${{ github.event.repository.name }}/basilisk/platform/.github/workflows/build-basilisk-windows/mach-passthrough-windows.sh /d/a/${{ github.event.repository.name }}/${{ github.event.repository.name }}/basilisk installer

- uses: actions/upload-artifact@v4
with:
name: basilisk-windows-${{ matrix.config.win }}
path: basilisk/obj-${{ matrix.config.arch }}-pc-mingw32/dist/basilisk-*
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
set -e

BASILISK_DIR=$1
MACH_ARG=$2

cd "$BASILISK_DIR"
./mach "$MACH_ARG"
39 changes: 39 additions & 0 deletions .github/workflows/build-basilisk-windows/mozconfig-win32
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Tell the build system if we're building 64-bit.
# Set this to `BUILD_64=1` for 64-bit, leave as-is for 32-bit
BUILD_64=

# Processor architecture specific build options
if [ -n "$BUILD_64" ]; then
BUILD_ARCH=x64
ac_add_options --target=x86_64-pc-mingw32
ac_add_options --host=x86_64-pc-mingw32
else
BUILD_ARCH=x86
fi

# Automatically clobber if CLOBBER was touched
mk_add_options AUTOCLOBBER=1

# Set Basilisk version to date timestamp
export BASILISK_VERSION=1

export MOZILLA_OFFICIAL=1

# Standard build options for Basilisk
ac_add_options --enable-application=basilisk
ac_add_options --enable-optimize="-O2 -GTs -GS- -Qspectre -utf-8"
ac_add_options --enable-update-channel=release
ac_add_options --enable-jemalloc
ac_add_options --enable-strip
ac_add_options --enable-devtools
ac_add_options --enable-av1
ac_add_options --enable-webrtc
ac_add_options --enable-gamepad
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --disable-official-branding
ac_add_options --disable-updater
ac_add_options --disable-precompiled-startupcache

WIN32_REDIST_DIR="C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/redist/MSVC/14.44.35112/$BUILD_ARCH/Microsoft.VC143.CRT"
WIN_UCRT_REDIST_DIR="C:/Program Files (x86)/Windows Kits/10/Redist/10.0.22621.0/ucrt/DLLs/$BUILD_ARCH"
39 changes: 39 additions & 0 deletions .github/workflows/build-basilisk-windows/mozconfig-win64
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Tell the build system if we're building 64-bit.
# Set this to `BUILD_64=1` for 64-bit, leave as-is for 32-bit
BUILD_64=1

# Processor architecture specific build options
if [ -n "$BUILD_64" ]; then
BUILD_ARCH=x64
ac_add_options --target=x86_64-pc-mingw32
ac_add_options --host=x86_64-pc-mingw32
else
BUILD_ARCH=x86
fi

# Automatically clobber if CLOBBER was touched
mk_add_options AUTOCLOBBER=1

# Set Basilisk version to date timestamp
export BASILISK_VERSION=1

export MOZILLA_OFFICIAL=1

# Standard build options for Basilisk
ac_add_options --enable-application=basilisk
ac_add_options --enable-optimize="-O2 -GTs -GS- -Qspectre -utf-8"
ac_add_options --enable-update-channel=release
ac_add_options --enable-jemalloc
ac_add_options --enable-strip
ac_add_options --enable-devtools
ac_add_options --enable-av1
ac_add_options --enable-webrtc
ac_add_options --enable-gamepad
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --disable-official-branding
ac_add_options --disable-updater
ac_add_options --disable-precompiled-startupcache

WIN32_REDIST_DIR="C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/redist/MSVC/14.44.35112/$BUILD_ARCH/Microsoft.VC143.CRT"
WIN_UCRT_REDIST_DIR="C:/Program Files (x86)/Windows Kits/10/Redist/10.0.26100.0/ucrt/DLLs/$BUILD_ARCH"
Loading