Skip to content

feat(wasm): add Emscripten/WebAssembly support #40

feat(wasm): add Emscripten/WebAssembly support

feat(wasm): add Emscripten/WebAssembly support #40

name: nfx-datetime - Windows MinGW
on:
push:
branches: [main]
paths-ignore:
- "**/*.md"
- "LICENSE"
- ".gitignore"
pull_request:
branches: [main]
paths-ignore:
- "**/*.md"
- "LICENSE"
- ".gitignore"
env:
BUILD_TYPE: Release
permissions:
contents: read
jobs:
build-windows-mingw:
runs-on: windows-2022
name: Windows MinGW
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: recursive
- name: Cache CMake build and ccache
uses: actions/cache@v4
with:
path: |
build
${{ runner.temp }}/ccache
key: ${{ runner.os }}-mingw-cmake-${{ hashFiles('**/CMakeLists.txt', 'include/**') }}
restore-keys: |
${{ runner.os }}-mingw-cmake-
- name: Set up MinGW
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
mingw-w64-x86_64-gcc
mingw-w64-x86_64-cmake
mingw-w64-x86_64-ninja
mingw-w64-x86_64-ccache
- name: Setup ccache
shell: msys2 {0}
run: |
export CCACHE_DIR="${{ runner.temp }}/ccache"
export CCACHE_COMPILERCHECK=content
export CCACHE_COMPRESS=true
export CCACHE_MAXSIZE=200M
mkdir -p "$CCACHE_DIR"
ccache --zero-stats
ccache --show-config
- name: Configure CMake
shell: msys2 {0}
run: |
export CC="ccache gcc"
export CXX="ccache g++"
export CCACHE_DIR="${{ runner.temp }}/ccache"
cmake -B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DNFX_DATETIME_BUILD_STATIC=ON \
-DNFX_DATETIME_BUILD_SHARED=ON \
-DNFX_DATETIME_BUILD_TESTS=ON \
-DNFX_DATETIME_BUILD_SAMPLES=ON \
-DNFX_DATETIME_BUILD_BENCHMARKS=ON \
-DNFX_DATETIME_BUILD_DOCUMENTATION=OFF
- name: Build
shell: msys2 {0}
run: |
export CCACHE_DIR="${{ runner.temp }}/ccache"
cmake --build build --parallel
- name: Test
shell: msys2 {0}
working-directory: build
run: ctest --output-on-failure --parallel
- name: Show ccache statistics
shell: msys2 {0}
run: |
export CCACHE_DIR="${{ runner.temp }}/ccache"
ccache --show-stats