Skip to content

Commit

Permalink
Update dependencies and optimize build configurations for Linux and W…
Browse files Browse the repository at this point in the history
…indows
  • Loading branch information
mr-cheff committed Dec 23, 2024
1 parent afddadb commit a8eff76
Show file tree
Hide file tree
Showing 12 changed files with 77 additions and 147 deletions.
71 changes: 27 additions & 44 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -322,13 +322,13 @@ jobs:
release-branch: ${{ inputs.update_branch }}

appimage:
name: AppImage build - Linux ${{ matrix.arch == 'x86_64' && 'generic' || matrix.arch == 'x86_64-v3' && 'specific' || matrix.arch == 'aarch64' && 'aarch64' }}
name: AppImage build - Linux ${{ matrix.arch }}
permissions:
contents: write
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x86_64, x86_64-v3, aarch64]
arch: [x86_64, aarch64]
needs: [linux]
steps:
- name: Checkout repository
Expand All @@ -351,7 +351,7 @@ jobs:
- name: Download Linux build
uses: actions/download-artifact@v4
with:
name: zen.linux-${{ matrix.arch == 'x86_64' && 'generic' || matrix.arch == 'x86_64-v3' && 'specific' || matrix.arch == 'aarch64' && 'aarch64' }}.tar.bz2
name: zen.linux-${{ matrix.arch }}.tar.bz2

- name: Execute AppImage build
run: |
Expand All @@ -375,25 +375,25 @@ jobs:
ls -al
find .
ls -al "$APPDIR"
ARCH=${{ matrix.arch == 'aarch64' && 'aarch64' || 'x86_64' }} ./appimagetool-x86_64.AppImage --comp zstd --mksquashfs-opt -Xcompression-level --mksquashfs-opt 10 \
-u "gh-releases-zsync|$GITHUB_REPOSITORY_OWNER|desktop|latest|zen-${{ matrix.arch == 'x86_64' && 'generic' || matrix.arch == 'x86_64-v3' && 'specific' || matrix.arch == 'aarch64' && 'aarch64' }}.AppImage.zsync" \
"$APPDIR" zen-${{ matrix.arch == 'x86_64' && 'generic' || matrix.arch == 'x86_64-v3' && 'specific' || matrix.arch == 'aarch64' && 'aarch64' }}.AppImage
ARCH=${{ matrix.arch }} ./appimagetool-x86_64.AppImage --comp zstd --mksquashfs-opt -Xcompression-level --mksquashfs-opt 10 \
-u "gh-releases-zsync|$GITHUB_REPOSITORY_OWNER|desktop|latest|zen-${{ matrix.arch }}.AppImage.zsync" \
"$APPDIR" zen-${{ matrix.arch }}.AppImage
mkdir dist
mv zen*AppImage* dist/.
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
retention-days: 5
name: zen-${{ matrix.arch == 'x86_64' && 'generic' || matrix.arch == 'x86_64-v3' && 'specific' || matrix.arch == 'aarch64' && 'aarch64' }}.AppImage
path: ./dist/zen-${{ matrix.arch == 'x86_64' && 'generic' || matrix.arch == 'x86_64-v3' && 'specific' || matrix.arch == 'aarch64' && 'aarch64' }}.AppImage
name: zen-${{ matrix.arch }}.AppImage
path: ./dist/zen-${{ matrix.arch }}.AppImage

- name: Upload artifact (ZSync)
uses: actions/upload-artifact@v4
with:
retention-days: 5
name: zen-${{ matrix.arch == 'x86_64' && 'generic' || matrix.arch == 'x86_64-v3' && 'specific' || matrix.arch == 'aarch64' && 'aarch64' }}.AppImage.zsync
path: ./dist/zen-${{ matrix.arch == 'x86_64' && 'generic' || matrix.arch == 'x86_64-v3' && 'specific' || matrix.arch == 'aarch64' && 'aarch64' }}.AppImage.zsync
name: zen-${{ matrix.arch }}.AppImage.zsync
path: ./dist/zen-${{ matrix.arch }}.AppImage.zsync

release:
if: ${{ inputs.create_release || inputs.update_branch == 'twilight' }}
Expand Down Expand Up @@ -438,17 +438,14 @@ jobs:
run: |
cd updates-server
mkdir -p updates
cp -a ../linux_update_manifest_generic/. updates/
cp -a ../linux_update_manifest_specific/. updates/
cp -a ../linux_update_manifest_x86_64/. updates/
cp -a ../linux_update_manifest_aarch64/. updates/
if [[ $RELEASE_BRANCH == 'beta' ]]; then
cp -a ../.github/workflows/object/windows-x64-signed-generic/update_manifest/. updates/
cp -a ../.github/workflows/object/windows-x64-signed-specific/update_manifest/. updates/
cp -a ../.github/workflows/object/windows-x64-signed-x86_64/update_manifest/. updates/
cp -a ../.github/workflows/object/windows-x64-signed-arm64/update_manifest/. updates/
else
cp -a ../windows_update_manifest_generic/. updates/
cp -a ../windows_update_manifest_specific/. updates/
cp -a ../windows_update_manifest_x86_64/. updates/
cp -a ../windows_update_manifest_arm64/. updates/
fi
Expand All @@ -470,28 +467,21 @@ jobs:
with:
files: |
zen.source.tar.gz
zen.linux-generic.tar.bz2
zen.linux-specific.tar.bz2
zen.linux-x86_64.tar.bz2
zen.linux-aarch64.tar.bz2
zen-generic.AppImage
zen-generic.AppImage.zsync
zen-specific.AppImage
zen-specific.AppImage.zsync
zen-x86_64.AppImage
zen-x86_64.AppImage.zsync
zen-aarch64.AppImage
zen-aarch64.AppImage.zsync
zen.win-generic.zip
zen.win-specific.zip
zen.win-x86_64.zip
zen.win-arm64.zip
linux.mar
linux-generic.mar
linux-aarch64.mar
windows-generic.mar
windows.mar
windows-arm64.mar
macos-x86_64.mar
macos-aarch64.mar
zen.installer.exe
zen.installer-generic.exe
zen.installer-arm64.exe
zen.macos-x86_64.dmg
zen.macos-aarch64.dmg
Expand All @@ -513,28 +503,21 @@ jobs:
title: 'Beta build - ${{ needs.build-data.outputs.version }} (${{ needs.build-data.outputs.build_date }})'
files: |
zen.source.tar.gz
zen.linux-generic.tar.bz2
zen.linux-specific.tar.bz2
zen.linux-x86_64.tar.bz2
zen.linux-aarch64.tar.bz2
zen-generic.AppImage
zen-generic.AppImage.zsync
zen-specific.AppImage
zen-specific.AppImage.zsync
zen-x86_64.AppImage
zen-x86_64.AppImage.zsync
zen-aarch64.AppImage
zen-aarch64.AppImage.zsync
.github/workflows/object/windows-x64-signed-generic/zen.win-generic.zip
.github/workflows/object/windows-x64-signed-specific/zen.win-specific.zip
.github/workflows/object/windows-x64-signed-x86_64/zen.win-x86_64.zip
.github/workflows/object/windows-x64-signed-arm64/zen.win-arm64.zip
linux.mar
linux-generic.mar
linux-aarch64.mar
.github/workflows/object/windows-x64-signed-generic/windows-generic.mar
.github/workflows/object/windows-x64-signed-specific/windows.mar
.github/workflows/object/windows-x64-signed-x86_64/windows.mar
.github/workflows/object/windows-x64-signed-arm64/windows-arm64.mar
macos-x86_64.mar
macos-aarch64.mar
.github/workflows/object/windows-x64-signed-specific/zen.installer.exe
.github/workflows/object/windows-x64-signed-generic/zen.installer-generic.exe
.github/workflows/object/windows-x64-signed-x86_64/zen.installer.exe
.github/workflows/object/windows-x64-signed-arm64/zen.installer-arm64.exe
zen.macos-x86_64.dmg
zen.macos-aarch64.dmg
Expand Down Expand Up @@ -612,10 +595,10 @@ jobs:
repository: flathub/io.github.zen_browser.zen
token: ${{ secrets.DEPLOY_KEY }}

- name: Download Linux generic build
- name: Download Linux x86_64 build
uses: actions/download-artifact@v4
with:
name: zen.linux-generic.tar.bz2
name: zen.linux-x86_64.tar.bz2

- name: Update repository
uses: actions/checkout@v4
Expand All @@ -637,7 +620,7 @@ jobs:
python3 ./zen-browser/scripts/prepare-flatpak-release.py \
--flatpak-archive archive.tar \
--version ${{ needs.build-data.outputs.version }} \
--linux-archive zen.linux-generic.tar.bz2 \
--linux-archive zen.linux-x86_64.tar.bz2 \
--output io.github.zen_browser.zen.yml \
--template-root ./zen-browser/flatpak
Expand All @@ -650,7 +633,7 @@ jobs:
run: |
rm -rf zen-browser
rm -rf archive.tar
rm -rf zen.linux-generic.tar.bz2
rm -rf zen.linux-x86_64.tar.bz2
- name: Upload Flatpak manifest
uses: actions/upload-artifact@v4
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/linux-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
strategy:
fail-fast: false
matrix:
arch: [x86_64, x86_64-v3, aarch64]
name: Build Linux - ${{ matrix.arch == 'x86_64' && 'Generic' || matrix.arch == 'x86_64-v3' && 'Specific' || matrix.arch == 'aarch64' && 'aarch64' }}
arch: [x86_64, aarch64]
name: Build Linux - ${{ matrix.arch }}

steps:
- name: Free Disk Space (Ubuntu)
Expand Down Expand Up @@ -147,26 +147,26 @@ jobs:
- name: Rename artifacts
run: |
mv dist/zen-*.tar.bz2 "zen.linux-${{ matrix.arch == 'x86_64' && 'generic' || matrix.arch == 'x86_64-v3' && 'specific' || matrix.arch == 'aarch64' && 'aarch64' }}.tar.bz2"
mv dist/output.mar linux${{ matrix.arch == 'x86_64' && '-generic' || matrix.arch == 'aarch64' && '-aarch64' || '' }}.mar
mv dist/zen-*.tar.bz2 "zen.linux-${{ matrix.arch }}.tar.bz2"
mv dist/output.mar linux${{ matrix.arch == 'aarch64' && '-aarch64' || '' }}.mar
- name: Upload build artifact (binary)
uses: actions/upload-artifact@v4
with:
retention-days: 5
name: zen.linux-${{ matrix.arch == 'x86_64' && 'generic' || matrix.arch == 'x86_64-v3' && 'specific' || matrix.arch == 'aarch64' && 'aarch64' }}.tar.bz2
path: ./zen.linux-${{ matrix.arch == 'x86_64' && 'generic' || matrix.arch == 'x86_64-v3' && 'specific' || matrix.arch == 'aarch64' && 'aarch64' }}.tar.bz2
name: zen.linux-${{ matrix.arch }}.tar.bz2
path: ./zen.linux-${{ matrix.arch }}.tar.bz2

- name: Upload build artifact (.mar)
uses: actions/upload-artifact@v4
with:
retention-days: 5
name: linux${{ matrix.arch == 'x86_64' && '-generic' || matrix.arch == 'aarch64' && '-aarch64' || '' }}.mar
path: ./linux${{ matrix.arch == 'x86_64' && '-generic' || matrix.arch == 'aarch64' && '-aarch64' || '' }}.mar
name: linux${{ matrix.arch == 'aarch64' && '-aarch64' || '' }}.mar
path: ./linux${{ matrix.arch == 'aarch64' && '-aarch64' || '' }}.mar

- name: Upload build artifact (update manifests)
uses: actions/upload-artifact@v4
with:
retention-days: 5
name: linux_update_manifest_${{ matrix.arch == 'x86_64' && 'generic' || matrix.arch == 'x86_64-v3' && 'specific' || matrix.arch == 'aarch64' && 'aarch64' }}
name: linux_update_manifest_${{ matrix.arch }}
path: ./dist/update
14 changes: 4 additions & 10 deletions .github/workflows/windows-profile-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ on:
jobs:
windows-profile-build:
name: |
Windows Profile Build - ${{ matrix.arch == 'x86_64' && 'generic' ||
matrix.arch == 'x86_64-v3' && 'specific' ||
matrix.arch == 'aarch64' && 'arm64' }}
Windows Profile Build - ${{ matrix.arch }}
strategy:
fail-fast: false
matrix:
arch: [x86_64, x86_64-v3, aarch64]
arch: [x86_64, aarch64]

runs-on: windows-latest

Expand Down Expand Up @@ -53,9 +51,7 @@ jobs:
uses: actions/download-artifact@v4
with:
path: C:\artifact
name: ${{ matrix.arch == 'x86_64' && 'generic' ||
matrix.arch == 'x86_64-v3' && 'specific' ||
matrix.arch == 'aarch64' && 'generic' }}-zen-windows-profile-data-and-jarlog.zip
name: ${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}-zen-windows-profile-data-and-jarlog.zip

- name: Unpack artifact
run: |
Expand Down Expand Up @@ -112,6 +108,4 @@ jobs:
path: |
merged.profdata
en-US.log
name: windows-profdata-${{ matrix.arch == 'x86_64' && 'generic' ||
matrix.arch == 'x86_64-v3' && 'specific' ||
matrix.arch == 'aarch64' && 'arm64' }}
name: windows-profdata-${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}
30 changes: 15 additions & 15 deletions .github/workflows/windows-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ on:

jobs:
windows-build:
name: Build Windows - ${{ matrix.arch == 'x86_64' && 'Generic' || matrix.arch == 'x86_64-v3' && 'Specific' || matrix.arch == 'aarch64' && 'ARM64' }}
name: Build Windows - ${{ matrix.arch }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
arch: [x86_64, x86_64-v3, aarch64]
arch: [x86_64, aarch64]

steps:
- name: Free Disk Space (Ubuntu)
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
if: ${{ !inputs.generate-gpo }}
with:
path: ~/artifact
name: windows-profdata-${{ matrix.arch == 'x86_64' && 'generic' || matrix.arch == 'x86_64-v3' && 'specific' || matrix.arch == 'aarch64' && 'arm64' }}
name: windows-profdata-${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}

- name: Show artifact info
if: ${{ !inputs.generate-gpo }}
Expand Down Expand Up @@ -190,16 +190,16 @@ jobs:
- name: Rename artifacts
if: ${{ !inputs.generate-gpo }}
run: |
mv ./zen.win64.zip zen.win-${{ matrix.arch == 'x86_64' && 'generic' || matrix.arch == 'x86_64-v3' && 'specific' || matrix.arch == 'aarch64' && 'arm64' }}.zip
mv ./dist/output.mar windows${{ matrix.arch == 'x86_64' && '-generic' || matrix.arch == 'aarch64' && '-arm64' || '' }}.mar
mv ./dist/zen.installer.exe ./zen.installer${{ matrix.arch == 'x86_64' && '-generic' || matrix.arch == 'aarch64' && '-arm64' || '' }}.exe
mv ./zen.win64.zip zen.win-${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}.zip
mv ./dist/output.mar windows${{ matrix.arch == 'aarch64' && '-arm64' || '' }}.mar
mv ./dist/zen.installer.exe ./zen.installer${{ matrix.arch == 'aarch64' && '-arm64' || '' }}.exe
- name: Upload artifact (PGO)
uses: actions/upload-artifact@v4
if: ${{ inputs.generate-gpo }}
with:
retention-days: 5
name: ${{ matrix.arch == 'x86_64' && 'generic' || matrix.arch == 'x86_64-v3' && 'specific' || matrix.arch == 'aarch64' && 'arm64' }}-${{ inputs.profile-data-path-archive }}
name: ${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}-${{ inputs.profile-data-path-archive }}
path: ./zen.win64-pgo-stage-1.zip

- name: Remove unnecessary files from obj
Expand All @@ -219,37 +219,37 @@ jobs:
uses: actions/upload-artifact@v4
with:
retention-days: 5
name: windows-x64-obj-${{ matrix.arch == 'x86_64' && 'generic' || matrix.arch == 'x86_64-v3' && 'specific' || matrix.arch == 'aarch64' && 'arm64' }}
name: windows-x64-obj-${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}
path: engine/obj-${{ matrix.arch == 'aarch64' && 'aarch64' || 'x86_64' }}-pc-windows-msvc/

- name: Upload artifact (if Twilight branch, binary)
if: ${{ inputs.release-branch == 'twilight' && !inputs.generate-gpo }}
uses: actions/upload-artifact@v4
with:
retention-days: 5
name: zen.win-${{ matrix.arch == 'x86_64' && 'generic' || matrix.arch == 'x86_64-v3' && 'specific' || matrix.arch == 'aarch64' && 'arm64' }}.zip
path: ./zen.win-${{ matrix.arch == 'x86_64' && 'generic' || matrix.arch == 'x86_64-v3' && 'specific' || matrix.arch == 'aarch64' && 'arm64' }}.zip
name: zen.win-${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}.zip
path: ./zen.win-${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}.zip

- name: Upload artifact (if Twilight branch, installer)
if: ${{ inputs.release-branch == 'twilight' && !inputs.generate-gpo }}
uses: actions/upload-artifact@v4
with:
retention-days: 5
name: zen.installer${{ matrix.arch == 'x86_64' && '-generic' || matrix.arch == 'aarch64' && '-arm64' || '' }}.exe
path: ./zen.installer${{ matrix.arch == 'x86_64' && '-generic' || matrix.arch == 'aarch64' && '-arm64' || '' }}.exe
name: zen.installer${{ matrix.arch == 'aarch64' && '-arm64' || '' }}.exe
path: ./zen.installer${{ matrix.arch == 'aarch64' && '-arm64' || '' }}.exe

- name: Upload artifact (if Twilight branch, .mar)
if: ${{ inputs.release-branch == 'twilight' && !inputs.generate-gpo }}
uses: actions/upload-artifact@v4
with:
retention-days: 5
name: windows${{ matrix.arch == 'x86_64' && '-generic' || matrix.arch == 'aarch64' && '-arm64' || '' }}.mar
path: ./windows${{ matrix.arch == 'x86_64' && '-generic' || matrix.arch == 'aarch64' && '-arm64' || '' }}.mar
name: windows${{ matrix.arch == 'aarch64' && '-arm64' || '' }}.mar
path: ./windows${{ matrix.arch == 'aarch64' && '-arm64' || '' }}.mar

- name: Upload artifact (if Twilight branch, update manifests)
if: ${{ inputs.release-branch == 'twilight' && !inputs.generate-gpo }}
uses: actions/upload-artifact@v4
with:
retention-days: 5
name: windows_update_manifest_${{ matrix.arch == 'x86_64' && 'generic' || matrix.arch == 'x86_64-v3' && 'specific' || matrix.arch == 'aarch64' && 'arm64' }}
name: windows_update_manifest_${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}
path: ./dist/update
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,7 @@ If you dont see your OS listed below, that's because we already have it in our [
##### Winget

```ps
# Generic version
winget install --id Zen-Team.Zen-Browser
# Optimized version
winget install --id Zen-Team.Zen-Browser.Optimized
```

#### macOS
Expand All @@ -98,11 +94,7 @@ brew install --cask zen-browser
##### Arch-based distributions

```sh
# For generic version
yay -S zen-browser-bin

# For optimized version
yay -S zen-browser-avx2-bin
```

##### Other Linux distributions (AppImage with automated system integration)
Expand Down
Loading

0 comments on commit a8eff76

Please sign in to comment.