Skip to content

Commit

Permalink
Merge pull request #111 from mcha-forks/v50dev
Browse files Browse the repository at this point in the history
build: misc changes
  • Loading branch information
tylov authored Jan 5, 2025
2 parents faf3aee + c1372c7 commit 54e330a
Show file tree
Hide file tree
Showing 11 changed files with 650 additions and 666 deletions.
6 changes: 4 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
*.h linguist-language=C
*.c linguist-language=C
* text=auto

*.h linguist-language=C
*.c linguist-language=C
23 changes: 0 additions & 23 deletions .github/workflows/cmake.yml

This file was deleted.

109 changes: 70 additions & 39 deletions .github/workflows/meson.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,73 +16,93 @@ jobs:
- release
mode:
- name: default
args: -Dtests=enabled
extra_envs: {}

# Alternative compiler setups
- name: gcc
args: -Dtests=enabled
extra_envs:
CC: gcc
CXX: g++
- name: clang
args: -Dtests=enabled
extra_envs:
CC: clang
CXX: clang++

- name: sanitize
args: >-
"-Db_sanitize=address,undefined"
extra_envs:
CC: gcc
CXX: g++
# For Visual Studio
extra_envs: {}

# This is for MSVC, which only supports AddressSanitizer.
# https://learn.microsoft.com/en-us/cpp/sanitizers/
- name: sanitize+asanonly
args: -Db_sanitize=address
extra_envs:
ASAN_OPTIONS: report_globals=0:halt_on_error=1:abort_on_error=1:print_summary=1

- name: clang+sanitize
args: >-
"-Db_sanitize=address,undefined"
extra_envs:
CC: clang
CXX: clang++
#- name: clang-cl+sanitize
# args: >-
# "-Db_sanitize=address,undefined"
# extra_envs:
# CC: clang-cl
# CXX: clang-cl
#- name: clang+msan
# args: -Db_sanitize=memory
# extra_envs:
# CC: clang
# CXX: clang++
#- name: clang-cl+msan
# args: -Db_sanitize=memory
# extra_envs:
# CC: clang-cl
# CXX: clang-cl
- name: clang+msan
args: -Db_sanitize=memory
extra_envs:
CC: clang
CXX: clang++

# default clang on GitHub hosted runners is from MSYS2.
# Use Visual Studio supplied clang-cl instead.
- name: clang-cl+sanitize
args: >-
"-Db_sanitize=address,undefined"
extra_envs:
CC: clang-cl
CXX: clang-cl
- name: clang-cl+msan
args: -Db_sanitize=memory
extra_envs:
CC: clang-cl
CXX: clang-cl
platform:
- ubuntu-22.04
- windows-2022
#- macos-latest
- macos-latest

exclude:
# clang-cl
# clang-cl only makes sense on windows.
- platform: ubuntu-22.04
mode:
name: clang-cl+sanitize
- platform: macos-latest
mode:
name: clang-cl+sanitize
- platform: windows-2022
mode:
name: clang+sanitize
- platform: windows-2022
mode:
name: sanitize+asanonly
flavor: release
- platform: ubuntu-22.04
mode:
name: clang-cl+msan
- platform: macos-latest
mode:
name: clang-cl+msan

# Use clang-cl instead of MSYS2 clang.
#
# we already tested clang+sanitize on linux,
# if this doesn't work, it should be an issue for MSYS2 team to consider.
- platform: windows-2022
mode:
name: clang
- platform: windows-2022
mode:
name: clang+sanitize
- platform: windows-2022
mode:
name: clang+msan
# msvc

# MSVC-only sanitizers
- platform: ubuntu-22.04
mode:
name: sanitize+asanonly
Expand All @@ -92,24 +112,35 @@ jobs:
- platform: windows-2022
mode:
name: sanitize
# default is clang

# clang is the default on macos
# also gcc is an alias to clang
- platform: macos-latest
mode:
name: clang+sanitize
# msan unsupported
name: clang
- platform: macos-latest
mode:
name: clang+msan
name: gcc

# gcc is the default on linux
- platform: ubuntu-22.04
mode:
name: gcc

# only run sanitizer tests on linux
#
# gcc/clang's codegen shouldn't massively change across platforms,
# and linux supports most of the sanitizers.
- platform: macos-latest
mode:
name: sanitize
flavor: release
name: clang+sanitize
- platform: macos-latest
mode:
# macos does not support msan
name: clang+msan
flavor: release


- platform: macos-latest
mode:
name: sanitize
steps:
- name: Setup meson
run: |
Expand Down
45 changes: 0 additions & 45 deletions CMakeLists.txt

This file was deleted.

1 change: 0 additions & 1 deletion examples/meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
root = not meson.is_subproject()
examples = get_option('examples').enable_auto_if(root)

if examples.enabled()
Expand Down
Loading

0 comments on commit 54e330a

Please sign in to comment.