From e039be4f05bb2f64eec932d07b1b5ca01edaee92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Thu, 21 Sep 2023 08:25:00 -0500 Subject: [PATCH] Move to before-install --- .../workflows/custom/after-install/action.yml | 42 ------------------- .../custom/before-install/action.yml | 32 ++++++++++++++ 2 files changed, 32 insertions(+), 42 deletions(-) diff --git a/.github/workflows/custom/after-install/action.yml b/.github/workflows/custom/after-install/action.yml index 5ba81da2f..f7590c909 100644 --- a/.github/workflows/custom/after-install/action.yml +++ b/.github/workflows/custom/after-install/action.yml @@ -15,48 +15,6 @@ runs: max-size: 200M verbose: 1 - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 - with: - detached: true - - - name: Environment before RUNNER_TEMP - run: | - env | sort - shell: bash - - - name: Download DuckDB binary - run: | - # FIXME: only for stable version, other code for dynamic version - - tempdir <- Sys.getenv("RUNNER_TEMP") - runner_os <- "${{ runner.os }}" - if (runner_os == "Linux") { - file <- "libduckdb-linux-amd64.zip" - } else if (runner_os == "Windows") { - file <- "libduckdb-windows-amd64.zip" - } else if (runner_os == "macOS") { - file <- "libduckdb-osx-universal.zip" - } - zipfile <- file.path(tempdir, "libduckdb.zip") - bindir <- file.path(tempdir, "libduckdb") - - # FIXME: dynamic detection of version number - download.file(file.path("https://github.com/duckdb/duckdb/releases/download", "v0.8.1", file), zipfile) - - unzip(zipfile, exdir = bindir) - - writeLines( - paste0("DUCKDB_BINARY_PATH=", bindir), - Sys.getenv("GITHUB_ENV") - ) - shell: Rscript {0} - - - name: Show DUCKDB_BINARY_PATH - run: | - echo $DUCKDB_BINARY_PATH - shell: bash - - name: Install to avoid R CMD INSTALL --pre-clean run otherwise run: | mkdir ../lib diff --git a/.github/workflows/custom/before-install/action.yml b/.github/workflows/custom/before-install/action.yml index 11b217853..a39e1fde2 100644 --- a/.github/workflows/custom/before-install/action.yml +++ b/.github/workflows/custom/before-install/action.yml @@ -19,3 +19,35 @@ runs: with: path: ${{ env.DUCKDB_R_PREBUILT_ARCHIVE }} key: ${{ env.DUCKDB_R_PREBUILT_ARCHIVE_GHA_CACHE_KEY }} + + - name: Download DuckDB binary + run: | + # FIXME: only for stable version, other code for dynamic version + + tempdir <- Sys.getenv("RUNNER_TEMP") + runner_os <- "${{ runner.os }}" + if (runner_os == "Linux") { + file <- "libduckdb-linux-amd64.zip" + } else if (runner_os == "Windows") { + file <- "libduckdb-windows-amd64.zip" + } else if (runner_os == "macOS") { + file <- "libduckdb-osx-universal.zip" + } + zipfile <- file.path(tempdir, "libduckdb.zip") + bindir <- file.path(tempdir, "libduckdb") + + # FIXME: dynamic detection of version number + download.file(file.path("https://github.com/duckdb/duckdb/releases/download", "v0.8.1", file), zipfile) + + unzip(zipfile, exdir = bindir) + + writeLines( + paste0("DUCKDB_BINARY_PATH=", bindir), + Sys.getenv("GITHUB_ENV") + ) + shell: Rscript {0} + + - name: Show DUCKDB_BINARY_PATH + run: | + echo $DUCKDB_BINARY_PATH + shell: bash