This repository was archived by the owner on Dec 12, 2025. It is now read-only.
forked from fox3000foxy/bareiron
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (50 loc) · 1.83 KB
/
build.yml
File metadata and controls
61 lines (50 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Build with Cosmopolitan
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Download cosmocc
run: |
curl -LO https://cosmo.zip/pub/cosmocc/cosmocc.zip
unzip cosmocc.zip -d cosmocc
echo "$PWD/cosmocc/bin" >> $GITHUB_PATH
- name: Install JDK 24
run: |
curl -LO https://download.java.net/java/GA/jdk24.0.2/fdc5d0102fe0414db21410ad5834341f/12/GPL/openjdk-24.0.2_linux-x64_bin.tar.gz
tar -xzf openjdk-24.0.2_linux-x64_bin.tar.gz
- name: Dump Minecraft server registries
run: |
mkdir notchian
cd notchian
curl -Lo server.jar https://piston-data.mojang.com/v1/objects/6bce4ef400e4efaa63a13d5e6f6b500be969ef81/server.jar
echo "eula=true" > eula.txt
../jdk-24.0.2/bin/java -DbundlerMainClass="net.minecraft.data.Main" -jar server.jar --all
- name: Generate registry headers
run: |
bun run build_registries.js
- name: Build project
run: |
cosmocc src/*.c -O3 -Iinclude -o bareiron.exe
- name: Upload release
uses: softprops/action-gh-release@v2
with:
tag_name: latest
name: Latest build
body: "This is a rolling release of bareiron, compiled from the latest commit on the main branch.\n\nThe executable (`bareiron.exe`) is a Cosmopolitan-built polyglot, and should run on Windows and Linux (and Mac?), despite the file extension."
files: bareiron.exe
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}