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-09-30 16:55:24 +00:00
|
|
|
VCPKG_ROOT: ${{ github.workspace }}/Build/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:
|
2024-10-01 20:15:12 +00:00
|
|
|
os: [ubuntu-24.04]
|
2022-12-01 09:08:12 +00:00
|
|
|
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:
|
2024-10-01 20:15:12 +00:00
|
|
|
group: ${{ github.workflow }}-${{ matrix.os_name }}
|
2022-12-01 09:08:12 +00:00
|
|
|
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-11-08 14:21:53 +00:00
|
|
|
cmake --preset Distribution_CI \
|
2024-11-08 13:17:19 +00:00
|
|
|
-DCMAKE_C_COMPILER=clang-18 \
|
|
|
|
-DCMAKE_CXX_COMPILER=clang++-18 \
|
2024-07-07 15:24:34 +00:00
|
|
|
-DENABLE_GUI_TARGETS=OFF
|
2024-10-01 20:15:12 +00:00
|
|
|
if: ${{ matrix.os_name == 'Linux' }}
|
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-11-08 14:21:53 +00:00
|
|
|
cmake --preset Distribution_CI \
|
2024-07-07 15:24:34 +00:00
|
|
|
-DCMAKE_OSX_DEPLOYMENT_TARGET="11.0" \
|
|
|
|
-DENABLE_GUI_TARGETS=OFF
|
2024-10-01 20:15:12 +00:00
|
|
|
if: ${{ matrix.os_name == 'macOS' }}
|
2022-12-01 09:08:12 +00:00
|
|
|
|
|
|
|
- name: Build and package js
|
2024-11-08 14:21:53 +00:00
|
|
|
working-directory: Build/distribution
|
2022-12-01 09:08:12 +00:00
|
|
|
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-11-08 14:21:53 +00:00
|
|
|
path: Build/distribution/ladybird-js*.tar.gz
|
2022-12-01 09:08:12 +00:00
|
|
|
retention-days: 7
|