diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index c8d55df9e4..412986b603 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -109,3 +109,26 @@ jobs: with: name: premake-${{ matrix.msystem }}-${{ matrix.platform }} path: bin\${{ matrix.config }}\ + cosmopolitan: + runs-on: ubuntu-latest + strategy: + matrix: + config: [debug, release] + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: tritao/setup-cosmopolitan@v1.3 + with: + version: '3.9.2' + - name: Build + run: make -f Bootstrap.mak cosmo CONFIG=${{ matrix.config }} + - name: Test + run: bin/${{ matrix.config }}/premake5 test --test-all + - name: Docs check + run: bin/${{ matrix.config }}/premake5 docs-check + - name: Upload Artifacts + if: matrix.config == 'release' + uses: actions/upload-artifact@v4 + with: + name: premake-cosmopolitan-universal + path: bin/${{ matrix.config }}/premake5 diff --git a/Bootstrap.mak b/Bootstrap.mak index 5934916ad5..479ed04f56 100644 --- a/Bootstrap.mak +++ b/Bootstrap.mak @@ -151,3 +151,12 @@ windows: windows-base windows-msbuild: windows-base msbuild /p:Configuration=$(CONFIG) /p:Platform=$(PLATFORM:x86=win32) .\build\bootstrap\Premake5.sln + +cosmo-clean: nix-clean + +cosmo: cosmo-clean + mkdir -p build/bootstrap + cosmocc -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_USE_POSIX -DLUA_USE_DLOPEN -I"$(LUA_DIR)" -I"$(LUASHIM_DIR)" $(SRC) -lm -ldl -lrt + ./build/bootstrap/premake_bootstrap embed + ./build/bootstrap/premake_bootstrap --to=build/bootstrap --cc=cosmocc gmake2 + $(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN` config=$(CONFIG)