2022-12-01 09:08:12 +00:00
|
|
|
name: Package the js repl as a binary artifact
|
|
|
|
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
env:
|
|
|
|
SERENITY_SOURCE_DIR: ${{ github.workspace }}
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-and-package:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
if: always() && github.repository == 'SerenityOS/serenity' && github.ref == 'refs/heads/master'
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-22.04]
|
|
|
|
package_type: [Linux-x86_64]
|
|
|
|
include:
|
2024-02-05 10:46:29 +00:00
|
|
|
- os: macos-14
|
2022-12-01 09:08:12 +00:00
|
|
|
package_type: macOS-universal2
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ matrix.os }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout SerenityOS/serenity
|
2023-09-11 01:51:11 +00:00
|
|
|
uses: actions/checkout@v4
|
2022-12-01 09:08:12 +00:00
|
|
|
|
|
|
|
- name: Install dependencies Ubuntu
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2024-02-05 10:45:43 +00:00
|
|
|
sudo apt-get install -y ninja-build unzip gcc-13 g++-13
|
2022-12-01 09:08:12 +00:00
|
|
|
if: ${{ matrix.os == 'ubuntu-22.04' }}
|
|
|
|
|
|
|
|
- name: Install dependencies macOS
|
|
|
|
run: |
|
|
|
|
brew install bash ninja unzip
|
2024-02-05 10:46:29 +00:00
|
|
|
if: ${{ matrix.os == 'macos-14' }}
|
2022-12-01 09:08:12 +00:00
|
|
|
|
|
|
|
- name: Check versions Ubuntu
|
|
|
|
run: |
|
2024-02-05 10:45:43 +00:00
|
|
|
ninja --version; gcc-13 --version; g++-13 --version
|
2022-12-01 09:08:12 +00:00
|
|
|
if: ${{ matrix.os == 'ubuntu-22.04' }}
|
|
|
|
|
|
|
|
- name: Check versions macOS
|
|
|
|
run: |
|
|
|
|
ninja --version; clang++ --version
|
2024-02-05 10:46:29 +00:00
|
|
|
if: ${{ matrix.os == 'macos-14' }}
|
2022-12-01 09:08:12 +00:00
|
|
|
|
|
|
|
- name: Create build directory
|
|
|
|
run: |
|
|
|
|
mkdir -p Build/TZDB
|
|
|
|
mkdir -p Build/UCD
|
|
|
|
mkdir -p Build/CLDR
|
|
|
|
|
|
|
|
- name: TimeZoneData cache
|
2024-01-22 01:31:48 +00:00
|
|
|
uses: actions/cache@v4
|
2022-12-01 09:08:12 +00:00
|
|
|
with:
|
|
|
|
path: ${{ github.workspace }}/libjs-test262/Build/TZDB
|
|
|
|
key: TimeZoneData-${{ hashFiles('Meta/CMake/time_zone_data.cmake') }}
|
|
|
|
|
|
|
|
- name: UnicodeData cache
|
2024-01-22 01:31:48 +00:00
|
|
|
uses: actions/cache@v4
|
2022-12-01 09:08:12 +00:00
|
|
|
with:
|
|
|
|
path: ${{ github.workspace }}/libjs-test262/Build/UCD
|
|
|
|
key: UnicodeData-${{ hashFiles('Meta/CMake/unicode_data.cmake') }}
|
|
|
|
|
|
|
|
- name: UnicodeLocale cache
|
2024-01-22 01:31:48 +00:00
|
|
|
uses: actions/cache@v4
|
2022-12-01 09:08:12 +00:00
|
|
|
with:
|
|
|
|
path: ${{ github.workspace }}/libjs-test262/Build/CLDR
|
2022-12-21 13:06:37 +00:00
|
|
|
key: UnicodeLocale-${{ hashFiles('Meta/CMake/locale_data.cmake') }}
|
2022-12-01 09:08:12 +00:00
|
|
|
|
|
|
|
- name: Create build directory Ubuntu
|
|
|
|
run: |
|
|
|
|
cmake -S Meta/Lagom -B Build -G Ninja \
|
2024-02-05 10:45:43 +00:00
|
|
|
-DCMAKE_C_COMPILER=gcc-13 \
|
|
|
|
-DCMAKE_CXX_COMPILER=g++-13 \
|
2022-12-01 09:08:12 +00:00
|
|
|
-DBUILD_LAGOM=ON
|
|
|
|
if: ${{ matrix.os == 'ubuntu-22.04' }}
|
|
|
|
|
|
|
|
- name: Create build directory macOS
|
|
|
|
run: |
|
|
|
|
# Note: We are using Apple Clang to create Universal binary
|
|
|
|
cmake -S Meta/Lagom -B Build -G Ninja \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \
|
2024-02-05 10:46:29 +00:00
|
|
|
-DCMAKE_OSX_DEPLOYMENT_TARGET="11.0" \
|
2022-12-01 09:08:12 +00:00
|
|
|
-DBUILD_LAGOM=ON
|
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
|
|
|
|
|
|
|
|
- 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 }}
|
|
|
|
path: Build/serenity-js*.tar.gz
|
|
|
|
retention-days: 7
|