Skip to content

Commit 3716035

Browse files
committed
Upgrade musl-toolchain to 1.2.5-oracle-00001.
1 parent 2a24120 commit 3716035

File tree

2 files changed

+6
-37
lines changed

2 files changed

+6
-37
lines changed

dist/main.js

Lines changed: 3 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/features/musl.ts

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import * as c from '../constants.js'
22
import * as core from '@actions/core'
33
import * as tc from '@actions/tool-cache'
4-
import { exec } from '../utils.js'
54
import { join } from 'path'
65

7-
const MUSL_NAME = 'x86_64-linux-musl-native'
8-
const MUSL_VERSION = '10.2.1'
6+
const MUSL_NAME = 'musl-toolchain'
7+
const MUSL_VERSION = '1.2.5-oracle-00001'
98

109
export async function setUpNativeImageMusl(): Promise<void> {
1110
if (!c.IS_LINUX) {
@@ -18,26 +17,10 @@ export async function setUpNativeImageMusl(): Promise<void> {
1817
} else {
1918
core.startGroup(`Setting up musl for GraalVM Native Image...`)
2019
const muslDownloadPath = await tc.downloadTool(
21-
`https://github.com/graalvm/setup-graalvm/releases/download/x86_64-linux-musl-${MUSL_VERSION}/${MUSL_NAME}.tgz`
20+
`https://gds.oracle.com/download/bfs/archive/musl-toolchain-${MUSL_VERSION}-linux-amd64.tar.gz`
2221
)
2322
const muslExtractPath = await tc.extractTar(muslDownloadPath)
2423
const muslPath = join(muslExtractPath, MUSL_NAME)
25-
26-
const zlibCommit = 'ec3df00224d4b396e2ac6586ab5d25f673caa4c2'
27-
const zlibDownloadPath = await tc.downloadTool(`https://github.com/madler/zlib/archive/${zlibCommit}.tar.gz`)
28-
const zlibExtractPath = await tc.extractTar(zlibDownloadPath)
29-
const zlibPath = join(zlibExtractPath, `zlib-${zlibCommit}`)
30-
const zlibBuildOptions = {
31-
cwd: zlibPath,
32-
env: {
33-
...process.env,
34-
CC: join(muslPath, 'bin', 'gcc')
35-
}
36-
}
37-
await exec('./configure', [`--prefix=${muslPath}`, '--static'], zlibBuildOptions)
38-
await exec('make', [], zlibBuildOptions)
39-
await exec('make', ['install'], { cwd: zlibPath })
40-
4124
core.info(`Adding ${MUSL_NAME} ${MUSL_VERSION} to tool-cache ...`)
4225
toolPath = await tc.cacheDir(muslPath, MUSL_NAME, MUSL_VERSION)
4326
core.endGroup()

0 commit comments

Comments
 (0)