use meson in ci
This commit is contained in:
57
.github/workflows/ci.yml
vendored
57
.github/workflows/ci.yml
vendored
@@ -18,24 +18,8 @@ jobs:
|
||||
linux:
|
||||
name: Linux (Ubuntu)
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Build
|
||||
run: |
|
||||
make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y
|
||||
- name: Stats
|
||||
run: |
|
||||
./qjs -qd
|
||||
- name: Run built-in tests
|
||||
run: |
|
||||
make test
|
||||
- name: Run microbench
|
||||
run: |
|
||||
make microbench
|
||||
container:
|
||||
image: gitea.pockle.world/john/prosperon/linux:latest
|
||||
|
||||
linux-lto:
|
||||
name: Linux LTO
|
||||
@@ -76,29 +60,30 @@ jobs:
|
||||
make CONFIG_M32=y test
|
||||
|
||||
linux-asan:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Check out
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Build
|
||||
run: |
|
||||
make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_ASAN=y
|
||||
- name: Run built-in tests
|
||||
env:
|
||||
ASAN_OPTIONS: halt_on_error=1
|
||||
run: |
|
||||
make CONFIG_ASAN=y test
|
||||
fetch-depth: 0
|
||||
|
||||
linux-msan:
|
||||
- name: Test
|
||||
run: |
|
||||
meson setup build -Dbuildtype=release -Db_lto=true -Db_ndebug=true
|
||||
meson test -C build
|
||||
|
||||
windows:
|
||||
name: Windows (mingw)
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: gitea.pockle.world/john/prosperon/linux:latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Check out
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Build
|
||||
env:
|
||||
CC: clang
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_MSAN=y CONFIG_CLANG=y
|
||||
- name: Run built-in tests
|
||||
@@ -283,3 +268,5 @@ jobs:
|
||||
run: docker run --privileged --rm tonistiigi/binfmt:master --install all
|
||||
- name: Run tests on ${{ matrix.platform }}
|
||||
run: docker run --rm --interactive --mount type=bind,source=$(pwd),target=/host --platform ${{ matrix.platform }} alpine sh -c "apk add git patch make gcc libc-dev && cd /host && make test"
|
||||
meson setup build -Dbuildtype=release -Db_lto=true -Db_ndebug=true --cross-file mingw32.cross
|
||||
meson test -C build
|
||||
|
||||
@@ -2,10 +2,13 @@ project('quickjs', 'c')
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
|
||||
threads = dependency('threads')
|
||||
|
||||
deps = []
|
||||
deps += cc.find_library('m', required:false)
|
||||
deps += threads
|
||||
|
||||
add_project_arguments('-DCONFIG_VERSION="2024-02-14"', language : 'c')
|
||||
add_project_arguments('-DCONFIG_VERSION="2024-02-14"', '-mcmodel=large', language: 'c')
|
||||
|
||||
if get_option('bignum')
|
||||
add_project_arguments('-DCONFIG_BIGNUM', language : 'c')
|
||||
@@ -25,8 +28,6 @@ libquickjs = library('quickjs',
|
||||
|
||||
quickjs_dep = declare_dependency(link_with: libquickjs, include_directories: include_directories('.'), dependencies: deps)
|
||||
|
||||
threads = dependency('threads')
|
||||
|
||||
qjsc = executable('qjsc',
|
||||
'qjsc.c', 'quickjs-libc.c',
|
||||
dependencies: [quickjs_dep,threads],
|
||||
|
||||
17
mingw32.cross
Normal file
17
mingw32.cross
Normal file
@@ -0,0 +1,17 @@
|
||||
[binaries]
|
||||
c = 'x86_64-w64-mingw32-gcc'
|
||||
cpp = 'x86_64-w64-mingw32-g++'
|
||||
ar = 'x86_64-w64-mingw32-ar'
|
||||
windres = 'x86_64-w64-mingw32-windres'
|
||||
strip = 'x86_64-w64-mingw32-strip'
|
||||
exe_wrapper = 'wine'
|
||||
pkg-config = 'pkg-config'
|
||||
|
||||
[host_machine]
|
||||
system = 'windows'
|
||||
cpu_family = 'x86_64'
|
||||
cpu = 'x86_64'
|
||||
endian = 'little'
|
||||
|
||||
[properties]
|
||||
needs_exe_wrapper = true
|
||||
Reference in New Issue
Block a user