Skip to content

some settings required to work in this project #6

some settings required to work in this project

some settings required to work in this project #6

Workflow file for this run

name: Build
on:
push:
branches:
- '**'
paths-ignore:
- '*.md'
- 'LICENSE'
tags-ignore:
- '**'
pull_request:
branches:
- '**'
paths-ignore:
- '*.md'
- 'LICENSE'
tags-ignore:
- '**'
env:
LLVM_VERSION: 14.0.6
LLVM_VERSION_MAJOR: 14
jobs:
build:
name: Node.js ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-12, macos-13, macos-14, ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022 ] # ubuntu-24.04 does not bring LLVM 14
node: [ 18, 20 ]
exclude:
- os: ubuntu-18.04
node: 18
steps:
- name: Fetch Codebase
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
check-latest: true
- name: Install LLVM and Ninja on macOS
if: startsWith(matrix.os, 'macos')
run: |
brew update
brew install llvm@${{ env.LLVM_VERSION_MAJOR }} ninja
- name: Install LLVM and Ninja on Ubuntu
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo wget https://apt.llvm.org/llvm.sh
sudo chmod +x llvm.sh
sudo ./llvm.sh ${{ env.LLVM_VERSION_MAJOR }}
sudo apt-get install ninja-build
- name: Install LLVM on Windows
if: startsWith(matrix.os, 'windows')
run: |
$LLVM_VERSION = "${{ env.LLVM_VERSION }}"
$LLVM_PREBUILT_FILE = "llvm-$LLVM_VERSION-${{ matrix.os }}.zip"
curl -sLO https://github.com/ApsarasX/llvm-windows/releases/download/llvmorg-$LLVM_VERSION/$LLVM_PREBUILT_FILE
Expand-Archive -Path $LLVM_PREBUILT_FILE -DestinationPath .
$LLVM_CMAKE_DIR = "$pwd\\LLVM-$LLVM_VERSION-win64\\lib\\cmake\\llvm"
echo "cmake_LLVM_DIR=$LLVM_CMAKE_DIR"> .npmrc
- name: Install Dependencies
run: npm install --ignore-scripts
- name: CMake Build Debug and Test
if: startsWith(matrix.os, 'windows') == false
run: |
npm run clear
npm run build:debug
npm test
- name: CMake Build Release and Test
run: |
npm run clear
npm run build:release
npm test