Skip to content

refactor(hook): use rwx #25

refactor(hook): use rwx

refactor(hook): use rwx #25

Workflow file for this run

on:
workflow_dispatch:
push:
branches: ["**"]
paths-ignore:
- "**/*.md"
name: πŸ§ͺ Run Tests
jobs:
test:
strategy:
fail-fast: false
matrix:
arch: [x86, x64]
config: [Release, Debug]
type: [linux, mingw, windows, windows-clang]
include:
- type: linux
container: fedora:38 # g++ on ubuntu latest does not include P2210R2
deps: sudo dnf install -y git cmake gcc gcc-c++ ninja-build
- type: mingw
container: archlinux:multilib-devel
deps: pacman --noconfirm -Syyu cmake gcc git make mingw-w64 wine
- type: mingw
arch: x86
cmake_args: -DCMAKE_TOOLCHAIN_FILE=cmake/mingw-x86.cmake
- type: mingw
arch: x64
cmake_args: -DCMAKE_TOOLCHAIN_FILE=cmake/mingw-x64.cmake
- type: windows
arch: x86
cmake_args: -A Win32
- type: windows
arch: x64
cmake_args: -A x64
- type: windows-clang
arch: x86
cmake_args: -T ClangCL -A Win32
- type: windows-clang
arch: x64
cmake_args: -T ClangCL -A x64
exclude:
- type: linux
arch: x86
runs-on: ${{ contains(matrix.type, 'windows') && 'windows-latest' || 'ubuntu-latest' }}
container: ${{ matrix.container }}
name: "${{ matrix.type }} (πŸ’Ύ: ${{ matrix.arch }}, βš™οΈ: ${{ matrix.config }})"
steps:
- name: πŸ“¦ Checkout
uses: actions/checkout@v4
- name: 🧰 Dependencies
run: ${{ matrix.deps }}
- name: πŸ”§ Compile
run: |
cmake -B build -Dlime_tests=ON ${{ matrix.cmake_args }}
cmake --build build --config ${{ matrix.config }}
- name: πŸ”¬ Run Tests
if: ${{ matrix.type != 'mingw' }}
run: |
ctest --test-dir build/tests -C ${{ matrix.config }} --verbose
- name: πŸ”¬ Run Tests (Wine)
if: ${{ matrix.type == 'mingw' }}
run: |
mkdir prefix
WINEPREFIX="$(pwd)/prefix" wine ./build/tests/lime-tests.exe