diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 00000000..23d6239c --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,42 @@ +name: CI + +on: [push] + +jobs: + build-linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + run: | + apt-get update + apt-get install -y meson ninja-build gcc g++ pkg-config + - name: Build + run: | + meson setup build -Dbuildtype=release + meson compile -C build + - name: Prepare tests + run: | + cp build/libcell_runtime.so . + cp build/cell . + mkdir -p ~/.cell/packages + ln -s "$PWD" ~/.cell/packages/core + - name: VM tests + run: ./cell --dev vm_suite + - name: Language tests + run: ./cell --dev test suite + - name: Fuzz + run: ./cell --dev fuzz + + build-windows: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + run: | + apt-get update + apt-get install -y meson ninja-build mingw-w64 pkg-config + - name: Build + run: | + meson setup build_win --cross-file cross/mingw64.ini -Dbuildtype=release + meson compile -C build_win diff --git a/cross/mingw64.ini b/cross/mingw64.ini new file mode 100644 index 00000000..30b736e1 --- /dev/null +++ b/cross/mingw64.ini @@ -0,0 +1,12 @@ +[binaries] +c = 'x86_64-w64-mingw32-gcc' +cpp = 'x86_64-w64-mingw32-g++' +ar = 'x86_64-w64-mingw32-ar' +strip = 'x86_64-w64-mingw32-strip' +windres = 'x86_64-w64-mingw32-windres' + +[host_machine] +system = 'windows' +cpu_family = 'x86_64' +cpu = 'x86_64' +endian = 'little' diff --git a/meson.build b/meson.build index 63f0d4e3..3bd71b6a 100644 --- a/meson.build +++ b/meson.build @@ -159,9 +159,12 @@ qbe_lib = static_library('qbe', if host_machine.system() == 'windows' exe_ext = '.exe' link += '-Wl,--export-all-symbols' -else +elif host_machine.system() == 'darwin' exe_ext = '' link += '-Wl,-export_dynamic' +else + exe_ext = '' + link += '-Wl,--export-dynamic' endif cell_so = shared_library(