diff --git a/.github/workflows/full_suite_integration_tests.yml b/.github/workflows/full_suite_integration_tests.yml index 72565755e2..abd2003432 100644 --- a/.github/workflows/full_suite_integration_tests.yml +++ b/.github/workflows/full_suite_integration_tests.yml @@ -99,7 +99,9 @@ jobs: - name: Prepare Google Service Account env: + GOOGLE_CLOUD_PROJECT: flank-open-source #needs to be removed. GCLOUD_KEY: ${{ secrets.GCLOUD_KEY }} + run: | if [ "$RUNNER_OS" == "Windows" ]; then set GCLOUD_DIR="%HOMEPATH%/.config/gcloud/" diff --git a/common/src/main/kotlin/flank/common/Files.kt b/common/src/main/kotlin/flank/common/Files.kt index db771f53b7..245be9e610 100644 --- a/common/src/main/kotlin/flank/common/Files.kt +++ b/common/src/main/kotlin/flank/common/Files.kt @@ -32,6 +32,8 @@ fun createCopy(sourceDirectoryLocation: String, destinationDirectoryLocation: St copyDirectory(sourceDirectoryLocation, destinationDirectoryLocation) } +fun createFileCopy(source: String, destination: String): Path = Files.copy(Paths.get(source), Paths.get(destination)) + fun copyDirectory(sourceDirectoryLocation: String, destinationDirectoryLocation: String) { Files.walk(Paths.get(sourceDirectoryLocation)) .forEach { source: Path -> @@ -68,9 +70,9 @@ fun createSymbolicLink( Paths.get(target).toAbsolutePath().normalize() ) -fun createSymbolicLinkToFile(link: Path, target: Path) { - Files.createSymbolicLink(link, target.fileName) -} +fun createLinkToFile(link: Path, target: Path): Path = + if (isWindows) createFileCopy(target.toString(), link.toString()) + else Files.createSymbolicLink(link, target.fileName) fun downloadFile(sourceUrl: String, destination: String) { Fuel.download(sourceUrl) diff --git a/common/src/test/kotlin/flank/common/FilesTest.kt b/common/src/test/kotlin/flank/common/FilesTest.kt index fc634bd8e2..d7493ad261 100644 --- a/common/src/test/kotlin/flank/common/FilesTest.kt +++ b/common/src/test/kotlin/flank/common/FilesTest.kt @@ -77,7 +77,7 @@ class FilesTest { val expectedDestination = Paths.get(root.newFolder("temp").toString(), "test.link") // when - createSymbolicLinkToFile(expectedDestination, testFile) + createLinkToFile(expectedDestination, testFile) // then assertTrue(Files.isSymbolicLink(expectedDestination)) diff --git a/test_runner/src/main/kotlin/ftl/ios/xctest/common/InstallParseBinaries.kt b/test_runner/src/main/kotlin/ftl/ios/xctest/common/InstallParseBinaries.kt index 595b0dc2e2..0fac5aecd4 100644 --- a/test_runner/src/main/kotlin/ftl/ios/xctest/common/InstallParseBinaries.kt +++ b/test_runner/src/main/kotlin/ftl/ios/xctest/common/InstallParseBinaries.kt @@ -3,7 +3,7 @@ package ftl.ios.xctest.common import flank.common.OutputLogLevel import flank.common.appDataDirectory import flank.common.createDirectoryIfNotExist -import flank.common.createSymbolicLinkToFile +import flank.common.createLinkToFile import flank.common.downloadFile import flank.common.hasAllFiles import flank.common.isMacOS @@ -54,7 +54,7 @@ private fun downloadAndUnzip(osname: String) { it.setExecutable(true) } Files.delete(destinationFile) - createSymbolicLinkToFile( + createLinkToFile( link = Paths.get(flankBinariesDirectory.toString(), "libatomic.so.1"), target = Paths.get(flankBinariesDirectory.toString(), "libatomic.so.1.2.0") )