Skip to content

Commit

Permalink
Add emscripten CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
eliaskosunen committed Oct 30, 2024
1 parent 88e23f2 commit b046035
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/arch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- master
- v*/dev
- ci/*
paths:
- '.github/workflows/arch.yml'
- 'cmake/**'
Expand All @@ -16,6 +17,7 @@ on:
branches:
- master
- v*/dev
- ci/*
paths:
- '.github/workflows/arch.yml'
- 'cmake/**'
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- master
- v*/dev
- ci/*
paths:
- '.github/workflows/linux.yml'
- 'benchmark/**'
Expand All @@ -18,6 +19,7 @@ on:
branches:
- master
- v*/dev
- ci/*
paths:
- '.github/workflows/linux.yml'
- 'benchmark/**'
Expand Down Expand Up @@ -710,3 +712,59 @@ jobs:
- name: Test
working-directory: ${{ runner.workspace }}/build
run: ctest --output-on-failure

emscripten:
runs-on: ubuntu-22.04

env:
CMAKE_CXX_STANDARD: 17
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache

steps:
- name: Setup CMake and Ninja
uses: lukka/get-cmake@latest

- name: Install ccache
run: |
${APT_INSTALL} ccache
- name: Checkout
uses: actions/checkout@v4

- name: Load ccache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ github.workflow }}-ubuntu22.04-${{ env.CXX }}-std${{ env.CMAKE_CXX_STANDARD }}-emscripten-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-ubuntu22.04-${{ env.CXX }}-std${{ env.CMAKE_CXX_STANDARD }}-emscripten-${{ github.ref }}
ccache-${{ github.workflow }}-ubuntu22.04-${{ env.CXX }}-std${{ env.CMAKE_CXX_STANDARD }}-emscripten-${{ github.base_ref }}
ccache-${{ github.workflow }}-ubuntu22.04-${{ env.CXX }}-std${{ env.CMAKE_CXX_STANDARD }}-emscripten
ccache-${{ github.workflow }}-ubuntu22.04-${{ env.CXX }}-std${{ env.CMAKE_CXX_STANDARD }}-${{ github.sha }}
ccache-${{ github.workflow }}-ubuntu22.04-${{ env.CXX }}-std${{ env.CMAKE_CXX_STANDARD }}-${{ github.ref }}
ccache-${{ github.workflow }}-ubuntu22.04-${{ env.CXX }}-std${{ env.CMAKE_CXX_STANDARD }}-${{ github.base_ref }}
ccache-${{ github.workflow }}-ubuntu22.04-${{ env.CXX }}-std${{ env.CMAKE_CXX_STANDARD }}
- name: Setup ccache
run: |
ccache --version
ccache --zero-stats
ccache --show-stats
ccache --show-config
- name: Setup EMSDK
uses: mymindstorm/setup-emsdk@v14
with:
version: latest
actions-cache-folder: 'emsdk-cache'

- name: Run CMake
run: |
mkdir ${{ runner.workspace }}/build
cd ${{ runner.workspace }}/build
emconfigure cmake -DSCN_CI=ON $GITHUB_WORKSPACE
- name: Build
working-directory: ${{ runner.workspace }}/build
run: |
emmake make -j -k
2 changes: 2 additions & 0 deletions .github/workflows/lite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches-ignore:
- master
- v*/dev
- ci/*
paths:
- '.github/workflows/lite.yml'
- 'benchmark/**'
Expand All @@ -18,6 +19,7 @@ on:
branches-ignore:
- master
- v*/dev
- ci/*
paths:
- '.github/workflows/lite.yml'
- 'benchmark/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- master
- v*/dev
- ci/*
paths:
- '.github/workflows/macos.yml'
- 'benchmark/**'
Expand All @@ -18,6 +19,7 @@ on:
branches:
- master
- v*/dev
- ci/*
paths:
- '.github/workflows/macos.yml'
- 'benchmark/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- master
- v*/dev
- ci/*
paths:
- '.github/workflows/windows.yml'
- 'benchmark/**'
Expand All @@ -18,6 +19,7 @@ on:
branches:
- master
- v*/dev
- ci/*
paths:
- '.github/workflows/windows.yml'
- 'benchmark/**'
Expand Down

0 comments on commit b046035

Please sign in to comment.