Skip to content

Commit

Permalink
Update url for kotlin native, change default to false (#98)
Browse files Browse the repository at this point in the history
Fixes #97
  • Loading branch information
fwilhe2 authored Feb 10, 2021
1 parent 6cc56a9 commit f5c4ad2
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ jobs:
- uses: ./
with:
version: 1.4.30
install-native: true
- run: kotlinc -version
- run: kotlinc-native -version
- run: echo 'fun main() {println("Hello Kotlin/Native!")}' > hello.kt
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: fwilhe2/setup-kotlin@main
with:
install-native: true
- run: kotlinc-native foo.kt
- run: ./program.exe
if: ${{ matrix.os == 'windows-latest' }}
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ inputs:
install-native:
required: false
description: 'Install Kotlin/Native tool chain (not needed for compiling jvm programs).'
default: true
default: false
script:
required: false
description: 'Script to execute, if so desired. If not provided, no script is executed and Kotlin cli tools can be used in subsequent steps.'
Expand Down
4 changes: 2 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions release-notes-draft.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@

Change default value of `install-native` option to `false`. This is due to instabilities with the url for downloading the Kotlin/Native toolchain, cf https://github.com/fwilhe2/setup-kotlin/issues/97, https://github.com/fwilhe2/setup-kotlin/issues/85
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function run(): Promise<void> {
The order of addPath call here matter because both archives have a "kotlinc" binary.
*/
if (installNative) {
core.addPath(`${nativeCachedPath}/kotlin-native-prebuilt-${osName()}-${version}/bin`)
core.addPath(`${nativeCachedPath}/kotlin-native-${osName()}-${version}/bin`)
await exec.exec('kotlinc-native', ['-version'])
}
core.addPath(`${cachedPath}/kotlinc/bin`)
Expand All @@ -64,7 +64,7 @@ export function getInputInstallNative(skipNative: string): boolean {

function nativeDownloadUrl(version: string): string {
const fileEnding = IS_WINDOWS ? 'zip' : 'tar.gz'
return `https://github.com/JetBrains/kotlin/releases/download/v${version}/kotlin-native-prebuilt-${osName()}-${version}.${fileEnding}`
return `https://github.com/JetBrains/kotlin/releases/download/v${version}/kotlin-native-${osName()}-${version}.${fileEnding}`
}

function osName(): string {
Expand Down

0 comments on commit f5c4ad2

Please sign in to comment.