Skip to content

Switch back to internal builds of igraph and HDF5. #511

Switch back to internal builds of igraph and HDF5.

Switch back to internal builds of igraph and HDF5. #511

Workflow file for this run

on:
push:
branches:
- master
pull_request:
name: Test JS bindings
env:
IMAGE_VERSION: master
jobs:
prepare-version:
runs-on: ubuntu-latest
steps:
- run: echo "null"
outputs:
version: ${{ env.IMAGE_VERSION }}
# Building the RDS files for the various RDS-reading utilities.
create_rds:
runs-on: ubuntu-latest
container: rocker/r-base:latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Build RDS files
run: |
cd tests/rds
R -f generate.R
- name: Upload RDS files
uses: actions/upload-artifact@v4
with:
name: rds-files
path: tests/rds/*.rds
build_deps:
runs-on: ubuntu-latest
needs: [prepare-version]
container: ghcr.io/kanaverse/emcmake-docker/builder:${{ needs.prepare-version.outputs.version }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Cache installed
id: installed
uses: actions/cache@v4
with:
path: extern/installed
key: deps-${{ hashFiles('**/extern/**/build.sh') }}-${{ env.IMAGE_VERSION }}
- name: Build HDF5
if: steps.installed.outputs.cache-hit != 'true'
run: |
cd extern/hdf5
./build.sh
- name: Build igraph
if: steps.installed.outputs.cache-hit != 'true'
run: |
cd extern/igraph
./build.sh
test:
runs-on: ubuntu-latest
needs: [ create_rds, build_deps, prepare-version]
container: ghcr.io/kanaverse/emcmake-docker/builder:${{ needs.prepare-version.outputs.version }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Cache Modules
uses: actions/cache@v4
with:
path: '**/node_modules'
key: npm-${{ hashFiles('**/package.json') }}
- name: Update NPM packages
run: npm i --include=dev
- name: Cache installed
uses: actions/cache@v4
with:
path: extern/installed
key: deps-${{ hashFiles('**/extern/**/build.sh') }}-${{ env.IMAGE_VERSION }}
- name: Cache node build
id: wasm-build
uses: actions/cache@v4
with:
path: js/wasm
key: deps-${{ hashFiles('**/build.sh', '**/CMakeLists.txt', '**/src/*') }}-${{ env.IMAGE_VERSION }}
- name: Update node build
if: steps.wasm-build.outputs.cache-hit != 'true'
run: bash build.sh main
- name: Download RDS files
uses: actions/download-artifact@v4
with:
name: rds-files
path: tests/rds
- name: Run tests
run: |
export CHECK_RDS=1
npm run test