Skip to content

test 18

test 18 #55

Workflow file for this run

name: Windows Test
on:
workflow_dispatch:
pull_request:
push:
tags:
- 'v*.*.*'
branches:
- master
- develop
- msys2env
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
windows-test:
name: Windows MSVC Test
runs-on: windows-2019 # TODO: Implement matrix with windows 2019 and 2022
strategy:
fail-fast: false
matrix:
options: [
{build: debug, sanitizer: without-sanitizer},
{build: debug, sanitizer: address-sanitizer},
# TODO: Not supported yet by MSVC
# {build: debug, sanitizer: thread-sanitizer},
# {build: debug, sanitizer: memory-sanitizer},
# TODO: https://github.com/metacall/core/issues/461
# {build: release, sanitizer: without-sanitizer}
]
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Activate the Visual Studio Developer Prompt
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
- name: Set up the environment
run: cmd.exe /c "powershell .\tools\metacall-environment.ps1 $Env:METACALL_INSTALL_OPTIONS"
env:
METACALL_INSTALL_OPTIONS: python nodejs java ruby typescript wasm rpc file # netcore5 java c cobol rust rapidjson funchook swig pack # clangformat v8rep51 coverage
- name: Configure
run: |
$METACALL_PATH = $PWD
md -Force "$METACALL_PATH\build"
cd "$METACALL_PATH\build"
cmd.exe /c "powershell ..\tools\metacall-configure.ps1 $Env:METACALL_BUILD_OPTIONS"
env:
METACALL_BUILD_OPTIONS: ${{ matrix.options.build }} ${{ matrix.options.sanitizer }} scripts ports tests python nodejs java ruby typescript wasm rpc file # netcore5 java c cobol rust examples install pack benchmarks # v8 coverage
- name: Build
working-directory: ./build
run: cmd.exe /c "powershell ..\tools\metacall-build.ps1 $Env:METACALL_BUILD_OPTIONS"
env:
METACALL_BUILD_OPTIONS: ${{ matrix.options.build }} tests
windows-mingw-test:
name: Windows MinGW Test
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- sys: mingw32
- sys: mingw64
- sys: ucrt64
- sys: clang64
defaults:
run:
shell: msys2 {0} # Ensures all commands run inside MSYS2
steps:
- name: 'Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: '${{ matrix.sys }} Setup MSYS2'
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
update: true
install: >-
git
make
pacboy: >-
toolchain:p
cmake:p
- name: 'Set Compiler Path'
run: |
if [ "${{ matrix.sys }}" == "clang64" ]; then
echo "C:/msys64/clang64/bin" >> $Env:GITHUB_PATH
elif [ "${{ matrix.sys }}" == "ucrt64" ]; then
echo "C:/msys64/ucrt64/bin" >> $Env:GITHUB_PATH
elif [ "${{ matrix.sys }}" == "mingw64" ]; then
echo "C:/msys64/mingw64/bin" >> $Env:GITHUB_PATH
elif [ "${{ matrix.sys }}" == "mingw32" ]; then
echo "C:/msys64/mingw32/bin" >> $Env:GITHUB_PATH
fi
echo "C:/msys64/usr/bin" >> $Env:GITHUB_PATH
- name: 'Create Build Directory'
run: mkdir -p build
- name: 'Configure with CMake'
run: |
cmake -G "MinGW Makefiles" -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=$(which gcc) \
-DCMAKE_CXX_COMPILER=$(which g++) \
-DOPTION_FORK_SAFE=OFF \
-DOPTION_BUILD_PLUGINS_BACKTRACE=OFF
- name: 'Build with CMake'
run: |
cmake --build build -- -j$(nproc)
windows-distributable:
name: Windows Distributable Dispatch
needs: windows-test
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master'
steps:
- name: Windows Workflow Dispatch
uses: convictional/[email protected]
with:
owner: metacall
repo: distributable-windows
github_token: ${{ secrets.G_PERSONAL_ACCESS_TOKEN }}
workflow_file_name: ci.yml
wait_workflow: true
client_payload: '{"ref": "${{ github.head_ref || github.ref_name }}"}'
ref: master