Skip to content

Commit

Permalink
Add CI and Cosmopolitan support to bootstrap build.
Browse files Browse the repository at this point in the history
  • Loading branch information
tritao committed Oct 2, 2024
1 parent 27fcba6 commit 98671e3
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 9 additions & 0 deletions Bootstrap.mak
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 98671e3

Please sign in to comment.