From e86a1647e20dfea6c04afc4a6ce8e3bd5f9ab565 Mon Sep 17 00:00:00 2001 From: kaklakariada Date: Sat, 21 Sep 2024 10:18:30 +0200 Subject: [PATCH] Add macos build --- .github/workflows/build.yml | 7 +++---- build.gradle | 3 ++- lua/src/Makefile | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3080d5b..0f94c22 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,15 +11,15 @@ jobs: strategy: matrix: - java: [22] - os: ['ubuntu-latest'] + java: [23] + os: ['ubuntu-latest', 'macos-latest'] runs-on: ${{ matrix.os }} concurrency: group: ${{ github.workflow }}-${{ github.ref }}-os-${{ matrix.os }}-java-${{ matrix.java }} cancel-in-progress: true name: "Build on ${{ matrix.os }} with Java ${{ matrix.java }}" env: - DEFAULT_JAVA: 22 + DEFAULT_JAVA: 23 DEFAULT_OS: 'ubuntu-latest' permissions: contents: read @@ -30,7 +30,6 @@ jobs: fetch-depth: 0 - uses: actions/setup-java@v4 with: - cache: gradle distribution: temurin java-version: ${{ matrix.java }} - name: Setup Gradle diff --git a/build.gradle b/build.gradle index 1f3dd42..652cf8c 100644 --- a/build.gradle +++ b/build.gradle @@ -14,7 +14,8 @@ dependencies { java { toolchain { - languageVersion = JavaLanguageVersion.of(22) + def javaVersion = project.hasProperty('javaVersion') ? project.getProperty('javaVersion') : 22 + languageVersion = JavaLanguageVersion.of(javaVersion) } } diff --git a/lua/src/Makefile b/lua/src/Makefile index 7975535..f35428d 100644 --- a/lua/src/Makefile +++ b/lua/src/Makefile @@ -63,6 +63,8 @@ a: $(ALL_A) so: $(LUA_SO) +dylib: $(LUA_DYLIB) + $(LUA_SO): $(CORE_O) $(LIB_O) $(CC) -o $@ -shared $?