2022-12-01 09:08:12 +00:00
|
|
|
name: Package the js repl as a binary artifact
|
|
|
|
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
env:
|
2024-06-03 12:40:19 +00:00
|
|
|
LADYBIRD_SOURCE_DIR: ${{ github.workspace }}
|
2024-05-02 18:38:23 +00:00
|
|
|
SERENITY_CCACHE_DIR: ${{ github.workspace }}/.ccache
|
2024-06-04 20:24:06 +00:00
|
|
|
VCPKG_ROOT: ${{ github.workspace }}/Toolchain/Tarballs/vcpkg
|
2024-06-06 20:55:14 +00:00
|
|
|
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
|
2022-12-01 09:08:12 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-and-package:
|
|
|
|
runs-on: ${{ matrix.os }}
|
2024-06-09 11:02:56 +00:00
|
|
|
if: always() && github.repository == 'LadybirdBrowser/ladybird' && github.ref == 'refs/heads/master'
|
2022-12-01 09:08:12 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-22.04]
|
|
|
|
package_type: [Linux-x86_64]
|
2024-05-01 10:06:00 +00:00
|
|
|
os_name: [Linux]
|
2022-12-01 09:08:12 +00:00
|
|
|
include:
|
2024-02-05 10:46:29 +00:00
|
|
|
- os: macos-14
|
2022-12-01 09:08:12 +00:00
|
|
|
package_type: macOS-universal2
|
2024-05-01 10:06:00 +00:00
|
|
|
os_name: macOS
|
2022-12-01 09:08:12 +00:00
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ matrix.os }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
steps:
|
2024-06-09 11:02:56 +00:00
|
|
|
- name: Checkout LadybirdBrowser/ladybird
|
2023-09-11 01:51:11 +00:00
|
|
|
uses: actions/checkout@v4
|
2022-12-01 09:08:12 +00:00
|
|
|
|
2024-05-01 10:06:00 +00:00
|
|
|
- name: "Set up environment"
|
|
|
|
uses: ./.github/actions/setup
|
|
|
|
with:
|
|
|
|
os: ${{ matrix.os_name }}
|
|
|
|
arch: 'Lagom'
|
2022-12-01 09:08:12 +00:00
|
|
|
|
2024-05-02 18:38:23 +00:00
|
|
|
- name: Restore Caches
|
|
|
|
uses: ./.github/actions/cache-restore
|
|
|
|
id: 'cache-restore'
|
2022-12-01 09:08:12 +00:00
|
|
|
with:
|
2024-05-02 18:38:23 +00:00
|
|
|
os: ${{ matrix.os_name }}
|
|
|
|
arch: 'Lagom'
|
|
|
|
cache_key_extra: 'LibJS Artifacts'
|
|
|
|
serenity_ccache_path: ${{ env.SERENITY_CCACHE_DIR }}
|
|
|
|
download_cache_path: ${{ github.workspace }}/Build/caches
|
2022-12-01 09:08:12 +00:00
|
|
|
|
|
|
|
- name: Create build directory Ubuntu
|
|
|
|
run: |
|
2024-06-06 20:55:14 +00:00
|
|
|
cmake --preset CI -B Build \
|
2024-06-07 20:33:54 +00:00
|
|
|
-DCMAKE_C_COMPILER=gcc-13 \
|
2024-06-06 20:55:14 +00:00
|
|
|
-DCMAKE_CXX_COMPILER=g++-13
|
2022-12-01 09:08:12 +00:00
|
|
|
if: ${{ matrix.os == 'ubuntu-22.04' }}
|
2024-05-02 18:38:23 +00:00
|
|
|
env:
|
|
|
|
CCACHE_DIR: ${{ env.SERENITY_CCACHE_DIR }}
|
2022-12-01 09:08:12 +00:00
|
|
|
|
|
|
|
- name: Create build directory macOS
|
|
|
|
run: |
|
|
|
|
# Note: We are using Apple Clang to create Universal binary
|
2024-06-06 20:55:14 +00:00
|
|
|
cmake --preset CI -B Build \
|
2022-12-01 09:08:12 +00:00
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \
|
2024-06-06 20:55:14 +00:00
|
|
|
-DCMAKE_OSX_DEPLOYMENT_TARGET="11.0"
|
2024-02-05 10:46:29 +00:00
|
|
|
if: ${{ matrix.os == 'macos-14' }}
|
2024-05-02 18:38:23 +00:00
|
|
|
env:
|
|
|
|
CCACHE_DIR: ${{ env.SERENITY_CCACHE_DIR }}
|
2022-12-01 09:08:12 +00:00
|
|
|
|
|
|
|
- name: Build and package js
|
|
|
|
working-directory: Build
|
|
|
|
run: |
|
|
|
|
ninja js
|
|
|
|
cpack
|
2024-05-02 18:38:23 +00:00
|
|
|
env:
|
|
|
|
CCACHE_DIR: ${{ env.SERENITY_CCACHE_DIR }}
|
|
|
|
|
|
|
|
- name: Save Caches
|
|
|
|
uses: ./.github/actions/cache-save
|
|
|
|
with:
|
2024-05-08 01:45:08 +00:00
|
|
|
arch: 'Lagom'
|
2024-05-02 18:38:23 +00:00
|
|
|
serenity_ccache_path: ${{ env.SERENITY_CCACHE_DIR }}
|
|
|
|
serenity_ccache_primary_key: ${{ steps.cache-restore.outputs.serenity_ccache_primary_key }}
|
2022-12-01 09:08:12 +00:00
|
|
|
|
|
|
|
- name: Upload js package
|
2023-12-18 01:32:02 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-12-01 09:08:12 +00:00
|
|
|
with:
|
|
|
|
name: serenity-js-${{ matrix.package_type }}
|
2024-05-30 21:06:21 +00:00
|
|
|
path: Build/ladybird-js*.tar.gz
|
2022-12-01 09:08:12 +00:00
|
|
|
retention-days: 7
|