chore: Update dependencies and build configurations for compatibility with x32 architecture

This commit is contained in:
Mauro Balades
2024-08-01 22:04:34 +02:00
parent be1efb2ac5
commit 406f11dd9a
10 changed files with 63 additions and 77 deletions

View File

@@ -229,13 +229,13 @@ jobs:
build-version: ${{ needs.build-data.outputs.version }}
appimage:
name: AppImage build - Linux ${{ matrix.arch }}
name: AppImage build - Linux ${{ matrix.generic == 'true' && 'generic' || 'specific' }}
permissions:
contents: write
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x64, x32]
generic: [true, false]
needs: [linux]
steps:
- name: Install Node.js
@@ -262,26 +262,24 @@ jobs:
cp configs/branding/alpha/logo128.png AppDir/usr/share/icons/hicolor/128x128/apps/zen.png
cp configs/branding/alpha/logo128.png AppDir/zen.png && ln -s zen.png AppDir/.DirIcon
APPIMAGE_TARGET=${{ matrix.arch == 'x64' && 'x86_64' || 'i686' }}
APPDIR=AppDir
tar -xvf *.tar.* && rm -rf *.tar.*
mv zen/* $APPDIR/
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-$APPIMAGE_TARGET.AppImage
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x *.AppImage
chmod +x ./AppDir/AppRun
echo "AppDir: $APPDIR"
ls -al
find .
ls -al "$APPDIR"
ARCH=$APPIMAGE_TARGET ./appimagetool-$APPIMAGE_TARGET.AppImage --comp gzip "$APPDIR" zen.AppImage
ARCH=x86_64 ./appimagetool-x86_64.AppImage --comp gzip "$APPDIR" zen.AppImage
mkdir dist
mv zen.AppImage* dist/.
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: zen-x${{ matrix.arch }}.AppImage
name: zen-${{ matrix.generic == 'true' && 'generic' || 'specific' }}.AppImage
path: ./dist/zen.AppImage
release:
@@ -314,9 +312,14 @@ jobs:
run: |
cd updates-server
mkdir -p updates
cp -a ../linux_update_manifest/. updates/
cp -a ../windows_update_manifest/. updates/
cp -a ../macos_update_manifest/. updates/
cp -a ../linux_update_manifest_generic/. updates/
cp -a ../linux_update_manifest_specific/. updates/
cp -a ../windows_update_manifest_generic/. updates/
cp -a ../windows_update_manifest_specific/. updates/
cp -a ../macos_update_manifest_aarch64/. updates/
cp -a ../macos_update_manifest_x64/. updates/
- uses: stefanzweifel/git-auto-commit-action@v4
with:
@@ -335,26 +338,26 @@ jobs:
files: |
zen.source.tar.gz
zen.linux-x64.tar.bz2
zen.linux-x32.tar.bz2
zen.linux-generic.tar.bz2
zen.linux-specific.tar.bz2
zen-x64.AppImage
zen-x32.AppImage
zen-generic.AppImage
zen-specific.AppImage
zen.win-x64.zip
zen.win-x32.zip
zen.win-generic.zip
zen.win-specific.zip
linux-x64.mar
linux-x32.mar
linux.mar
linux-generic.mar
windows-x64.mar
windows-x32.mar
windows.mar
windows-generic.mar
macos-x64.mar
macos-aarch64.mar
zen.installer-x64.exe
zen.installer-x32.exe
zen.installer.exe
zen.installer-generic.exe
zen.macos-x64.dmg
zen.macos-aarch64.dmg

View File

@@ -13,9 +13,10 @@ jobs:
contents: write
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: [x64, x32]
name: Build Linux - ${{ matrix.arch }}
generic: [true, false]
name: Build Linux - ${{ matrix.generic == 'true' && 'Generic' || 'Specific' }}
steps:
- name: Install Node.js
@@ -83,11 +84,6 @@ jobs:
- name: Install dependencies
run: pnpm install
- name: Run compatibility install
if: matrix.arch == 'x32'
run: |
rustup target add i686-unknown-linux-gnu
- name: Load surfer CI setup
run: pnpm surfer ci --brand alpha --display-version ${{ inputs.build-version }}
@@ -96,7 +92,7 @@ jobs:
- name: Import
env:
SURFER_COMPAT: ${{ matrix.arch == 'x32' }}
SURFER_COMPAT: ${{ matrix.generic == 'true' }}
run: pnpm surfer import
- name: Bootstrap
@@ -107,19 +103,19 @@ jobs:
- name: Build
env:
SURFER_COMPAT: ${{ matrix.arch == 'x32' }}
SURFER_COMPAT: ${{ matrix.generic == 'true' }}
continue-on-error: true
run: sh .github/workflows/src/alpha-build.sh
- name: Build again if it failed
if: failure()
env:
SURFER_COMPAT: ${{ matrix.arch == 'x32' }}
SURFER_COMPAT: ${{ matrix.generic == 'true' }}
run: sh .github/workflows/src/alpha-build.sh
- name: Package
env:
SURFER_COMPAT: ${{ matrix.arch == 'x32' }}
SURFER_COMPAT: ${{ matrix.generic == 'true' }}
run: pnpm package
- name: Rename artifacts
@@ -130,17 +126,17 @@ jobs:
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: zen.linux-${{ matrix.arch }}.tar.bz2
name: zen.linux-${{ matrix.generic == 'true' && 'generic' || 'specific' }}.tar.bz2
path: ./zen.linux.tar.bz2
- name: Upload mar
uses: actions/upload-artifact@v4
with:
name: linux-${{ matrix.arch }}.mar
name: linux${{ matrix.generic == 'true' && '-generic' || '' }}.mar
path: ./linux.mar
- name: Upload update manifests
uses: actions/upload-artifact@v4
with:
name: linux_update_manifest_${{ matrix.arch }}
name: linux_update_manifest_${{ matrix.generic == 'true' && 'generic' || 'specific' }}
path: ./dist/update

View File

@@ -12,6 +12,7 @@ jobs:
name: Build macOS - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- arch: aarch64

View File

@@ -16,11 +16,12 @@ on:
jobs:
windows-build:
name: Build Windows - ${{ matrix.arch }}
name: Build Windows - ${{ matrix.generic == 'true' && 'Generic' || 'Specific' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: [x64, x32]
generic: [true, false]
steps:
- name: Install Node.js and pnpm
@@ -119,11 +120,7 @@ jobs:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.76
source $HOME/.cargo/env
if test ${{ matrix.arch }} == 'x32'; then
rustup target add i686-pc-windows-msvc
else
rustup target add x86_64-pc-windows-msvc
fi
rustup target add x86_64-pc-windows-msvc
cargo install cargo-download
cargo download -x windows=0.52.0
#? https://github.com/mozilla/sccache#known-caveats
@@ -140,12 +137,12 @@ jobs:
- name: Import
env:
SURFER_COMPAT: ${{ matrix.arch == 'x32' }}
SURFER_COMPAT: ${{ matrix.generic == 'true' }}
run: pnpm surfer import --verbose
- name: Build
env:
SURFER_COMPAT: ${{ matrix.arch == 'x32' }}
SURFER_COMPAT: ${{ matrix.generic == 'true' }}
run: |
set -x
dos2unix configs/windows/mozconfig
@@ -158,7 +155,7 @@ jobs:
- name: Package
env:
SURFER_COMPAT: ${{ matrix.arch == 'x32' }}
SURFER_COMPAT: ${{ matrix.generic == 'true' }}
run: |
set -x
export SURFER_PLATFORM="win32"
@@ -178,7 +175,7 @@ jobs:
uses: actions/upload-artifact@v4
if: ${{ !inputs.generate-gpo }}
with:
name: zen.win-${{ matrix.arch }}.zip
name: zen.win-${{ matrix.generic == 'true' && 'generic' || 'specific' }}.zip
path: ./zen.win64.zip
- name: Upload PGO build
@@ -192,14 +189,14 @@ jobs:
uses: actions/upload-artifact@v4
if: ${{ !inputs.generate-gpo }}
with:
name: windows-${{ matrix.arch }}.mar
name: windows${{ matrix.generic == 'true' && '-generic' || '' }}.mar
path: ./windows.mar
- name: Upload installer
uses: actions/upload-artifact@v4
if: ${{ !inputs.generate-gpo }}
with:
name: zen.installer-${{ matrix.arch }}.exe
name: zen.installer${{ matrix.generic == 'true' && '-generic' || '' }}.exe
path: ./dist/zen.installer.exe
- name: Upload installer stub
@@ -213,5 +210,5 @@ jobs:
uses: actions/upload-artifact@v4
if: ${{ !inputs.generate-gpo }}
with:
name: windows_update_manifest_${{ matrix.arch }}
name: windows_update_manifest_${{ matrix.generic == 'true' && 'generic' || 'specific' }}
path: ./dist/update