Skip to content

Commit 2a3c908

Browse files
committed
feat: update luau to latest, publish release and debug native builds
1 parent a041f3e commit 2a3c908

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

.github/workflows/build-natives.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,20 @@ jobs:
3737
uses: jwlawson/actions-setup-cmake@v2
3838
with:
3939
cmake-version: '3.28.x'
40-
- name: Build & Publish
40+
- name: Build & Publish Release
4141
env:
4242
TAG_VERSION: ${{ github.ref_name }}
4343
LUAU_PUBLISH_NATIVES: true
4444
run: |
45-
./gradlew nmcpPublishAggregationToCentralPortal
45+
./gradlew nmcpPublishAggregationToCentralPortal -PbuildType=Release
4646
- name: artifact
4747
uses: actions/upload-artifact@v4
4848
with:
4949
name: luau-natives-${{ matrix.name }}-${{ github.ref_name }}.jar
5050
path: native/build/libs/luau-natives-${{ matrix.name }}-${{ github.ref_name }}.jar
51+
- name: Build & Publish Debug
52+
env:
53+
TAG_VERSION: ${{ github.ref_name }}-debug
54+
LUAU_PUBLISH_NATIVES: true
55+
run: |
56+
./gradlew nmcpPublishAggregationToCentralPortal -PbuildType=Debug
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

native/build.gradle.kts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ version = rootProject.version
1313
description = rootProject.description
1414

1515
val artifactName = "luau-natives-${getOsName()}-${getArchName()}"
16+
val buildType: String by project.extra { "Release" }
1617

1718
val buildProjectDir = file(layout.buildDirectory.file("root").get())
1819

@@ -69,10 +70,12 @@ tasks.register<Exec>("prepNative") {
6970
val cmake: String? by project.extra
7071
val args = mutableListOf(
7172
cmake ?: throw IllegalStateException("cmake not found on path"),
73+
"-DCMAKE_BUILD_TYPE=${buildType}", "-DCMAKE_POSITION_INDEPENDENT_CODE=ON",
74+
// We don't control the library so warnings are kinda irrelevant. can just suppress.
75+
"-DCMAKE_CXX_FLAGS=-w", "-DCMAKE_C_FLAGS=-w",
76+
// Just need the libraries themselves, not the extras.
77+
"-DLUAU_BUILD_CLI=OFF", "-DLUAU_BUILD_TESTS=OFF",
7278
"-DLUAU_EXTERN_C=ON",
73-
"-DLUAU_BUILD_CLI=OFF",
74-
"-DLUAU_BUILD_TESTS=OFF",
75-
"-DCMAKE_POSITION_INDEPENDENT_CODE=ON",
7679
"-B", ".",
7780
"-S", buildProjectDir
7881
)
@@ -101,8 +104,8 @@ tasks.register<Exec>("buildNative") {
101104
tasks.register<Copy>("copyNative") {
102105
dependsOn("buildNative")
103106

104-
var libPath = "cmake/lib" // todo it should definitely be a release build. need to do that.
105-
if (getOsName() == "windows") libPath += "/Debug"
107+
var libPath = "cmake/lib"
108+
if (getOsName() == "windows") libPath += "/${buildType}"
106109
from(file(layout.buildDirectory).resolve(libPath))
107110
into(file(layout.buildDirectory).resolve("nres/net/hollowcube/luau/${getOsName()}/${getArchName()}"))
108111
}

native/luau

Submodule luau updated 247 files

0 commit comments

Comments
 (0)