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-08-27 22:43:14 +00:00
|
|
|
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'
|
2024-08-27 22:43:14 +00:00
|
|
|
ccache_path: ${{ env.CCACHE_DIR }}
|
2024-05-02 18:38:23 +00:00
|
|
|
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-07-07 15:24:34 +00:00
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
2024-06-07 20:33:54 +00:00
|
|
|
-DCMAKE_C_COMPILER=gcc-13 \
|
2024-07-07 15:24:34 +00:00
|
|
|
-DCMAKE_CXX_COMPILER=g++-13 \
|
|
|
|
-DENABLE_GUI_TARGETS=OFF
|
2022-12-01 09:08:12 +00:00
|
|
|
if: ${{ matrix.os == 'ubuntu-22.04' }}
|
2024-05-02 18:38:23 +00:00
|
|
|
env:
|
2024-08-27 22:43:14 +00:00
|
|
|
CCACHE_DIR: ${{ env.CCACHE_DIR }}
|
2022-12-01 09:08:12 +00:00
|
|
|
|
2024-06-10 02:07:42 +00:00
|
|
|
# FIXME: Add the following flag back when vcpkg supports Universal binaries:
|
|
|
|
# -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
|
|
|
|
#
|
|
|
|
# See: https://github.com/microsoft/vcpkg/discussions/19454
|
2022-12-01 09:08:12 +00:00
|
|
|
- name: Create build directory macOS
|
|
|
|
run: |
|
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 \
|
2024-07-07 15:24:34 +00:00
|
|
|
-DCMAKE_OSX_DEPLOYMENT_TARGET="11.0" \
|
|
|
|
-DENABLE_GUI_TARGETS=OFF
|
2024-02-05 10:46:29 +00:00
|
|
|
if: ${{ matrix.os == 'macos-14' }}
|
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
|
|
|
|
|
|
|
- name: Save Caches
|
|
|
|
uses: ./.github/actions/cache-save
|
|
|
|
with:
|
2024-05-08 01:45:08 +00:00
|
|
|
arch: 'Lagom'
|
2024-08-27 22:43:14 +00:00
|
|
|
ccache_path: ${{ env.CCACHE_DIR }}
|
|
|
|
ccache_primary_key: ${{ steps.cache-restore.outputs.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:
|
2024-06-25 23:22:04 +00:00
|
|
|
name: ladybird-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
|