Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
FooBarWidget committed Sep 18, 2024
1 parent c7aa0b9 commit f0a36de
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ jobs:

- name: Setup sccache
run: ./dev/ci/setup-sccache aarch64-apple-darwin
env:
SCCACHE_LOG: debug
SCCACHE_AZURE_CONNECTION_STRING: ${{ secrets.AZURE_CI_STORAGE_CONNECTION_STRING }}

- name: Setup test config
run: cp test/config.json.github-ci-macos test/config.json
Expand All @@ -64,7 +67,6 @@ jobs:
run: bundle exec drake test:cxx
env:
SUDO: '1'
SCCACHE_AZURE_CONNECTION_STRING: ${{ secrets.AZURE_CI_STORAGE_CONNECTION_STRING }}

- name: Archive logs
uses: actions/upload-artifact@v4
Expand All @@ -74,6 +76,7 @@ jobs:

- name: Teardown sccache
run: ./dev/ci/teardown-sccache
if: always()

# integration:
# name: '${{ matrix.integration.name }} integration tests on ${{ matrix.os }}'
Expand Down
24 changes: 17 additions & 7 deletions dev/ci/setup-sccache
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
#!/usr/bin/env bash
set -e

ARCH="$1"
ARCH_AND_OS="$1"

echo "PATH=/usr/local/libexec/sccache:/usr/local/bin:$PATH" >> "$GITHUB_ENV"
echo "SCCACHE_ERROR_LOG=$(tty)" >> "$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.tar.gz"
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"
tar xzf sccache.tar.gz
rm sccache.tar.gz
sudo mv sccache*/sccache /usr/local/bin/sccache
rm -rf sccache*

sudo mkdir -p /usr/local/libexec/sccache
sudo ln -s /usr/local/bin/sccache /usr/local/libexec/sccache/cc
sudo ln -s /usr/local/bin/sccache /usr/local/libexec/sccache/c++
for PROG in cc c++; do
FULLPATH=$(command -v "$PROG")
echo '#!/bin/sh' > "$PROG"
echo "exec /usr/local/bin/sccache $FULLPATH \"\$@\"" >> "$PROG"
cat "$PROG"
chmod +x "$PROG"
sudo mv "$PROG" /usr/local/libexec/sccache/
done

SCCACHE_START_SERVER=1 sccache
touch sccache.log
export SCCACHE_START_SERVER=1
# Uncomment this to have the sccache server write debug logs to sccache.log
# export SCCACHE_LOG=debug
sccache
1 change: 1 addition & 0 deletions dev/ci/teardown-sccache
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
set -ex

sccache --stop-server
cat sccache.log

0 comments on commit f0a36de

Please sign in to comment.