From 46a64eb16481c3981791725fb371e72f755c72e7 Mon Sep 17 00:00:00 2001
From: Hongli Lai <hongli@phusion.nl>
Date: Wed, 18 Sep 2024 17:55:19 +0200
Subject: [PATCH] test

---
 .github/workflows/main.yml |  3 ++-
 dev/ci/setup-sccache       | 10 ++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 4c9a20b3e3..9affca0084 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -52,8 +52,9 @@ jobs:
           bundler-cache: true
 
       - name: Setup sccache
-        run: ./dev/ci/setup-sccache aarch64-apple-darwin
+        run: ./dev/ci/setup-sccache
         env:
+          ARCH_AND_OS: aarch64-apple-darwin
           SCCACHE_LOG: debug
           SCCACHE_AZURE_CONNECTION_STRING: ${{ secrets.AZURE_CI_STORAGE_CONNECTION_STRING }}
 
diff --git a/dev/ci/setup-sccache b/dev/ci/setup-sccache
index 6fc0a5673c..62d6aad9aa 100755
--- a/dev/ci/setup-sccache
+++ b/dev/ci/setup-sccache
@@ -1,11 +1,17 @@
 #!/usr/bin/env bash
 set -e
 
-ARCH_AND_OS="$1"
+if [[ -z "$ARCH_AND_OS" ]]; then
+  echo "ARCH_AND_OS is required"
+  exit 1
+fi
+if [[ -z "$SCCACHE_AZURE_CONNECTION_STRING" ]]; then
+  echo "SCCACHE_AZURE_CONNECTION_STRING is required"
+  exit 1
+fi
 
 echo "PATH=/usr/local/libexec/sccache:/usr/local/bin:$PATH" >> "$GITHUB_ENV"
 echo "SCCACHE_ERROR_LOG=$(pwd)/sccache.log" >> "$GITHUB_ENV"
-echo "SCCACHE_LOG=sccache=trace" >> "$GITHUB_ENV"
 set -x
 
 wget --output-document sccache.tar.gz "https://github.com/mozilla/sccache/releases/download/v0.8.1/sccache-v0.8.1-$ARCH_AND_OS.tar.gz"