diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9eab46f..b5fc636 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,149 +18,33 @@ 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-asan: + steps: + - name: Check out + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - 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 - 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: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Build - env: - CC: clang + - name: Test run: | - make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_MSAN=y CONFIG_CLANG=y - - name: Run built-in tests - env: - MSAN_OPTIONS: halt_on_error=1 - run: | - make CONFIG_MSAN=y CONFIG_CLANG=y test - - linux-ubsan: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Build - run: | - make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_UBSAN=y - - name: Run built-in tests - env: - UBSAN_OPTIONS: halt_on_error=1 - run: | - make CONFIG_UBSAN=y test - - macos: - name: macOS - runs-on: macos-latest - strategy: - fail-fast: false - steps: - - uses: actions/checkout@v4 - - name: Build - run: | - make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y - - name: Stats - run: | - ./qjs -qd - - name: Run built-in tests - run: | - make test - - macos-asan: - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - 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 - - macos-ubsan: - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - name: Build - run: | - make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y CONFIG_UBSAN=y - - name: Run built-in tests - env: - UBSAN_OPTIONS: halt_on_error=1 - run: | - make CONFIG_UBSAN=y test - - freebsd: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Build + test - uses: vmactions/freebsd-vm@v1 - with: - usesh: true - prepare: | - pkg install -y gmake - run: | - gmake - ./qjs -qd - gmake test - - qemu-alpine: - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - platform: - - i386 - - arm32v6 - - arm32v7 - - arm64v8 - - s390x - - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Get qemu - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - - name: Run tests on ${{ matrix.platform }} - run: docker run --rm --interactive --mount type=bind,source=$(pwd),target=/host ${{ 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 diff --git a/mingw32.cross b/mingw32.cross new file mode 100644 index 0000000..af60c54 --- /dev/null +++ b/mingw32.cross @@ -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