Skip to content

Commit 2c9dd8b

Browse files
authored
Merge pull request #294 from GordonSmith/OSX_TEST
chore: add osx build tests
2 parents 486273c + 417cd9e commit 2c9dd8b

File tree

4 files changed

+86
-14
lines changed

4 files changed

+86
-14
lines changed

.github/workflows/test-pr.yml

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: ubuntu-24.04
1211
strategy:
1312
fail-fast: false
1413
matrix:
14+
os: [ubuntu-24.04, macos-13, macos-14]
1515
node: [18, 20, 22]
1616

17-
name: Node ${{ matrix.node }} sample
17+
runs-on: ${{ matrix.os }}
18+
name: Node ${{ matrix.os }}, node-${{ matrix.node }} sample
1819
steps:
1920
- name: Checkout Sources
2021
uses: actions/checkout@v4
@@ -26,27 +27,46 @@ jobs:
2627
registry-url: "https://registry.npmjs.org"
2728
scope: "@hpcc-js"
2829

29-
- name: Install OS Dependencies
30+
- name: Install Ubuntu Dependencies
31+
if: ${{ contains(matrix.os, 'ubuntu') }}
3032
run: |
3133
sudo apt-get update
3234
sudo apt-get install -y build-essential
3335
sudo apt-get install -y git cmake ninja-build wget zip
3436
sudo apt-get install -y gcc-multilib g++-multilib pkg-config autoconf bison libtool flex
3537
sudo apt-get install -y python3 python3-pip
3638
39+
- name: Install OSX Dependencies
40+
if: ${{ contains(matrix.os, 'macos') }}
41+
run: |
42+
brew install ninja flex bison automake autoconf-archive coreutils
43+
if [[ $(uname -m) == 'arm64' ]]; then
44+
echo "PATH=/opt/homebrew/opt/bison/bin:/opt/homebrew/opt/flex/bin:$PATH" >> $GITHUB_ENV
45+
else
46+
echo "PATH=/usr/local/opt/bison/bin:/opt/homebrew/opt/flex/bin:$PATH" >> $GITHUB_ENV
47+
fi
48+
bison --version
49+
3750
- name: Export GitHub Actions cache environment variables
3851
uses: actions/github-script@v7
3952
with:
4053
script: |
4154
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
4255
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
4356
44-
- name: Install Dependencies
57+
- name: npm ci
4558
run: |
59+
bison --version
4660
npm ci
47-
sudo npx playwright install chromium --with-deps
61+
62+
- name: npx playwright install
63+
run: |
64+
npx playwright install --with-deps
65+
66+
- name: install-build-deps
67+
run: |
4868
npm run install-build-deps
49-
69+
5070
- name: Lint
5171
run: |
5272
npm run lint
@@ -60,15 +80,15 @@ jobs:
6080
npm run test
6181
6282
- name: Calculate Coverage
63-
if: ${{ matrix.node == 20 }}
83+
if: ${{ matrix.os == 'ubuntu-24.04' && matrix.node == 20 }}
6484
run: |
6585
npm run coverage
6686
6787
- name: Upload error logs
6888
if: ${{ failure() || cancelled() }}
6989
uses: actions/upload-artifact@v4
7090
with:
71-
name: ${{ matrix.node }}-logs
91+
name: ${{ matrix.os }}-${{ matrix.node }}-logs
7292
path: |
7393
./vcpkg/buildtrees/**/*.log
7494
./build/**/*.log

README.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
![Tests](https://github.com/hpcc-systems/hpcc-js-wasm/workflows/Test%20PR/badge.svg)
44
[![Coverage Status](https://coveralls.io/repos/github/GordonSmith/hpcc-js-wasm/badge.svg?branch=BUMP_VERSIONS)](https://coveralls.io/github/GordonSmith/hpcc-js-wasm?branch=BUMP_VERSIONS)
55

6-
**Note: @hpcc-js/wasm is now an ESM by default package** - this is a good thing, but does require some breaking changes.
7-
86
This repository contains a collection of useful c++ libraries compiled to WASM for (re)use in Node JS, Web Browsers and JavaScript Libraries:
97
- [base91](https://base91.sourceforge.net/) - v0.6.0
108
- [duckdb](https://github.com/duckdb/duckdb) - v1.1.1
@@ -128,3 +126,39 @@ Graphviz.load().then(graphviz => {
128126
console.log(graphviz.version());
129127
});
130128
```
129+
130+
## Build Instructions
131+
132+
The following instructions are for building the entire repository from scratch. In general the instructions assume you are running from within a bash terminal.
133+
134+
* Windows (With WSL2 and Git Bash installed)
135+
* Linux (native or WSL2)
136+
* MacOS
137+
* Docker
138+
139+
## Pre-requisites
140+
141+
To get an idea of what pre-requisites are required, please see the following files:
142+
143+
* [Dockerfile](docker/ubuntu-dev.dockerfile)
144+
* [GH Action Ubuntu](.github/workflows/test-pr.yml)
145+
* NodeJS
146+
147+
## Steps (Docker)
148+
149+
```bash
150+
git clone https://github.com/hpcc-systems/hpcc-js-wasm.git
151+
cd hpcc-js-wasm
152+
npm ci
153+
npm run build-docker
154+
```
155+
156+
## Steps (Windows, Linux, MacOS)
157+
158+
```bash
159+
git clone https://github.com/hpcc-systems/hpcc-js-wasm.git
160+
cd hpcc-js-wasm
161+
npm ci
162+
npm run install-build-deps
163+
npm run build
164+
```

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
],
2424
"scripts": {
2525
"install-emsdk": "run-script-os",
26-
"install-emsdk:linux": "./scripts/cpp-install-emsdk.sh",
26+
"install-emsdk:default": "./scripts/cpp-install-emsdk.sh",
2727
"install-emsdk:win32": "wsl -e ./scripts/cpp-install-emsdk.sh",
2828
"install-vcpkg": "run-script-os",
29-
"install-vcpkg:linux": "./scripts/cpp-install-vcpkg.sh",
29+
"install-vcpkg:default": "./scripts/cpp-install-vcpkg.sh",
3030
"install-vcpkg:win32": "wsl -e ./scripts/cpp-install-vcpkg.sh",
3131
"install-playright": "npx playwright install",
3232
"install-build-deps": "run-s install-emsdk install-vcpkg install-playright",
@@ -43,7 +43,7 @@
4343
"gen-docs": "typedoc",
4444
"gen-docs-watch": "typedoc --watch",
4545
"build-cpp": "run-script-os",
46-
"build-cpp:linux": "./scripts/cpp-build.sh",
46+
"build-cpp:default": "./scripts/cpp-build.sh",
4747
"build-cpp:win32": "wsl -e ./scripts/cpp-build.sh",
4848
"build-cpp-watch": "chokidar 'packages/*/src-cpp/**/*' -c 'npm run build-cpp'",
4949
"build-types-watch": "lerna run build-types-watch",

vcpkg-overlays/graphviz/CMakeLists.txt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ include(CTest)
610610
# hpcc-js-wasm add_subdirectory(contrib/prune)
611611
# hpcc-js-wasm add_subdirectory(graphs)
612612
add_subdirectory(lib)
613-
add_subdirectory(plugin)
613+
# add_subdirectory(plugin)
614614
if(GRAPHVIZ_CLI)
615615
# hpcc-js-wasm add_subdirectory(cmd)
616616
endif()
@@ -621,6 +621,24 @@ if(with_cxx_tests)
621621
endif()
622622

623623
# === hpcc-js-wasm ===
624+
add_subdirectory(plugin/core)
625+
# add_subdirectory(plugin/devil)
626+
add_subdirectory(plugin/dot_layout)
627+
add_subdirectory(plugin/gd)
628+
# add_subdirectory(plugin/gdiplus)
629+
# add_subdirectory(plugin/gdk)
630+
# add_subdirectory(plugin/gs)
631+
# add_subdirectory(plugin/kitty)
632+
# add_subdirectory(plugin/lasi)
633+
add_subdirectory(plugin/neato_layout)
634+
add_subdirectory(plugin/pango)
635+
# add_subdirectory(plugin/poppler)
636+
# add_subdirectory(plugin/quartz)
637+
# add_subdirectory(plugin/rsvg)
638+
# add_subdirectory(plugin/vt)
639+
add_subdirectory(plugin/webp)
640+
# add_subdirectory(plugin/xlib)
641+
624642
add_library(graphviz INTERFACE)
625643

626644
target_include_directories(graphviz

0 commit comments

Comments
 (0)