You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/07/11 09:35:09 UTC

[GitHub] [arrow] pitrou commented on a diff in pull request #13556: ARROW-17021:[C++][R][CI] Enable use of sccache in crossbow

pitrou commented on code in PR #13556:
URL: https://github.com/apache/arrow/pull/13556#discussion_r917728804


##########
cpp/cmake_modules/DefineOptions.cmake:
##########
@@ -111,7 +111,10 @@ if(ARROW_DEFINE_OPTIONS)
 
   define_option(ARROW_POSITION_INDEPENDENT_CODE
                 "Whether to create position-independent target" ON)
-
+  
+  define_option(ARROW_USE_SCCACHE "Use sccache when compiling (if available), takes precdent\

Review Comment:
   ```suggestion
     define_option(ARROW_USE_SCCACHE "Use sccache when compiling (if available), takes precdence\
   ```



##########
dev/tasks/r/github.packages.yml:
##########
@@ -114,17 +124,38 @@ jobs:
       - run: git config --global core.autocrlf false
       {{ macros.github_checkout_arrow()|indent }}
       {{ macros.github_change_r_pkg_version(is_fork, '${{ needs.source.outputs.pkg_version }}')|indent }}
-
       - uses: r-lib/actions/setup-r@v2
         with:
           rtools-version: 40
           r-version: "4.0"
           Ncpus: 2
+      - name: Get sccache
+        shell: bash
+        run: |
+          SCCACHE_BUILD=pc-windows-msvc
+          SCCACHE_URL="https://github.com/mozilla/sccache/releases/download/v0.3.0/sccache-v0.3.0-x86_64-$SCCACHE_BUILD.tar.gz"

Review Comment:
   Should there be a script e.g. `ci/script/install_sccache.sh` for this?
   
   The syntax could be `ci/scripts/install_sccache.sh <build> <executable install dir>`



##########
dev/tasks/r/github.packages.yml:
##########
@@ -280,10 +319,33 @@ jobs:
         with:
           install-r: false
       {{ macros.github_setup_local_r_repo(false, false)|indent }}
+      - name: Get sccache
+        shell: bash
+        run: |
+          SCCACHE_BUILD=unknown-linux-musl
+          SCCACHE_URL="https://github.com/mozilla/sccache/releases/download/v0.3.0/sccache-v0.3.0-x86_64-$SCCACHE_BUILD.tar.gz"
+
+          # Download archive and checksum
+          curl -L $SCCACHE_URL --output sccache.tar.gz
+          curl -L $SCCACHE_URL.sha256 --output sccache.tar.gz.sha256
+
+          SCCACHE_ARCHIVE=sccache.tar.gz
+          echo "$(cat $SCCACHE_ARCHIVE.sha256) $SCCACHE_ARCHIVE" | sha256sum --check --status
+
+          mkdir -p sccache
+          tar -xzvf $SCCACHE_ARCHIVE --strip-component=1 --directory sccache
+
+          echo "$(pwd)/sccache" >> $GITHUB_PATH
+          echo "SCCACHE_PATH=$(pwd)/sccache/sccache.exe" >> $GITHUB_ENV
+      - run: sudo apt update && sudo apt install libcurl4-openssl-dev

Review Comment:
   Seems a bit weird indeed. Why would dev dependencies be neede for a compiled executable?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org