From f856cf811faab51a3eec1693fd988a6c41d81999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20=C5=9Awi=C4=85tkowski?= Date: Sun, 4 Jan 2026 19:52:11 +0100 Subject: [PATCH 1/2] Require sys/socket.h (for Cosmopolitan) Compilation of mirb with Cosmopolitan fails because of missing include (Cosmopolitan seems to be more strict than "traditional" compilers. --- mrbgems/mruby-bin-mirb/tools/mirb/mirb_term.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mrbgems/mruby-bin-mirb/tools/mirb/mirb_term.c b/mrbgems/mruby-bin-mirb/tools/mirb/mirb_term.c index 24c0fec29..ced2b4c2f 100644 --- a/mrbgems/mruby-bin-mirb/tools/mirb/mirb_term.c +++ b/mrbgems/mruby-bin-mirb/tools/mirb/mirb_term.c @@ -13,6 +13,7 @@ #include #include #include +#include #include /* From 1881a904a424ae57289cfabb2cebf51ad4533249 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20=C5=9Awi=C4=85tkowski?= Date: Sun, 4 Jan 2026 20:23:45 +0100 Subject: [PATCH 2/2] Add Cosmopolitan build to CI --- .github/workflows/build.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 198276e73..5207a48c6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,6 +39,30 @@ jobs: - name: Build and test run: rake -m test:run:serial + Cosmopolitan: + runs-on: ubuntu-24.04 + timeout-minutes: 15 + steps: + - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" + uses: actions/checkout@v6 + - name: Ruby version + run: ruby -v + - name: Cache cosmocc + uses: actions/cache@v4 + id: cache-cosmocc + with: + path: ~/cosmo + key: cosmocc-${{ runner.os }}-20260104 + - name: Install cosmocc + if: steps.cache-cosmocc.outputs.cache-hit != 'true' + run: | + mkdir -p ~/cosmo && cd ~/cosmo + wget https://cosmo.zip/pub/cosmocc/cosmocc.zip + unzip cosmocc.zip + - name: Build and test + run: | + COSMO_ROOT=~/cosmo rake -m test:run:serial MRUBY_CONFIG=cosmopolitan + Windows-VC: runs-on: windows-2022 timeout-minutes: 10