Skip to content

Commit

Permalink
[Dev] Wasm.yml: Trigger also on nightly AND on changes to file
Browse files Browse the repository at this point in the history
  • Loading branch information
carlopi committed Sep 20, 2023
1 parent 25858b7 commit f91a320
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 5 deletions.
59 changes: 58 additions & 1 deletion .github/workflows/Wasm.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,60 @@
name: DuckDB-Wasm extensions
on:
repository_dispatch:
inputs:
# Git ref of the duckdb repo
duckdb-ref:
required: false
type: string
default: main
# Publish extensions on extensions.duckdb.org?
release_s3:
required: false
type: boolean
default: false
push:
inputs:
# Git ref of the duckdb repo
duckdb-ref:
required: false
type: string
default: main
# Publish extensions on extensions.duckdb.org?
release_s3:
required: false
type: boolean
default: false
branches:
- '**'
- '!main'
- '!feature'
tags:
- '**'
paths-ignore:
- '**.md'
- 'tools/**'
- '.github/workflows/**'
- '!.github/workflows/Wasm.yml'
- '.github/config/uncovered_files.csv'
pull_request:
inputs:
# Git ref of the duckdb repo
duckdb-ref:
required: false
type: string
default: main
# Publish extensions on extensions.duckdb.org?
release_s3:
required: false
type: boolean
default: false
types: [opened, reopened, ready_for_review]
paths-ignore:
- '**.md'
- 'tools/**'
- '.github/workflows/**'
- '!.github/workflows/Wasm.yml'
- '.github/config/uncovered_files.csv'
workflow_dispatch:
inputs:
# Git ref of the duckdb repo
Expand All @@ -26,6 +81,7 @@ jobs:
GEN: Ninja
VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
DUCKDB_PLATFORM: "wasm_${{ matrix.duckdb_wasm_arch }}"
EXTENSION_CONFIGS: "${GITHUB_WORKSPACE}/.github/config/in_tree_extensions.cmake;${GITHUB_WORKSPACE}/.github/config/out_of_tree_extensions.cmake"

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -63,12 +119,13 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: duckdb-wasm-${{ matrix.duckdb_wasm_arch }}
path: loadable_extensions/
path: build_emscripten/wasm_${{ matrix.duckdb_wasm_arch }}/built_extensions
retention-days: 1

trigger_github_pages_build:
name: Trigger follow-up work
runs-on: ubuntu-latest
if: ${{ github.event.inputs.release_s3 }}
needs: build_and_publish
steps:
- name: Move control to duckdb-wasm
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -407,14 +407,14 @@ generate-files:
python3 scripts/generate_serialization.py
python3 scripts/generate_enum_util.py

wasm-extensions-mvp:
wasm-extensions-mvp: ${EXTENSION_CONFIG_STEP}
mkdir -p build_emscripten/wasm_mvp
emcmake cmake -DDUCKDB_CUSTOM_PLATFORM=wasm_mvp -DBUILD_EXTENSIONS_ONLY=1 -Bbuild_emscripten/wasm_mvp
emcmake cmake -DDUCKDB_CUSTOM_PLATFORM=wasm_mvp -DBUILD_EXTENSIONS_ONLY=1 -Bbuild_emscripten/wasm_mvp ${CMAKE_VARS}
emmake make -j8 -Cbuild_emscripten/wasm_mvp
cd build_emscripten/wasm_mvp && bash ../../scripts/duckdb-wasm-build-loadable.sh

wasm-extensions-eh:
wasm-extensions-eh: ${EXTENSION_CONFIG_STEP}
mkdir -p build_emscripten/wasm_eh
emcmake cmake -DWITH_WASM_EXCEPTIONS=1 -DDUCKDB_CUSTOM_PLATFORM=wasm_eh -DBUILD_EXTENSIONS_ONLY=1 -Bbuild_emscripten/wasm_eh
emcmake cmake -DWITH_WASM_EXCEPTIONS=1 -DDUCKDB_CUSTOM_PLATFORM=wasm_eh -DBUILD_EXTENSIONS_ONLY=1 -Bbuild_emscripten/wasm_eh ${CMAKE_VARS}
emmake make -j8 -Cbuild_emscripten/wasm_eh
cd build_emscripten/wasm_eh && bash ../../scripts/duckdb-wasm-build-loadable.sh

0 comments on commit f91a320

Please sign in to comment.