diff options
Diffstat (limited to '.github/actions/common-setup')
| -rw-r--r-- | .github/actions/common-setup/action.yml | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/.github/actions/common-setup/action.yml b/.github/actions/common-setup/action.yml index f2e9567dd..1ab2d1a48 100644 --- a/.github/actions/common-setup/action.yml +++ b/.github/actions/common-setup/action.yml @@ -28,6 +28,20 @@ runs: with: sdk: "10.0.19041.0" + - name: Install dependencies (Linux only) + shell: bash + run: | + if [[ "${{ inputs.os }}" == "linux" ]]; then + sudo apt-get update + sudo apt-get install -y libx11-dev + fi + + - name: Setup Node.js (Linux only) + if: inputs.os == 'linux' + uses: actions/setup-node@v4 + with: + node-version: "20.x" + - shell: bash run: | # Set up system dependencies @@ -84,7 +98,7 @@ runs: id: cache-llvm if: inputs.build-llvm == 'true' with: - path: ${{ github.workspace }}/build/llvm-project-install + path: build/llvm-project-install # Use os*compiler*platform in lieu of an ABI key here, which is what we really want key: llvm-${{ inputs.os }}-${{ inputs.compiler }}-${{ inputs.platform }}-${{ hashFiles('external/build-llvm.sh') }} - name: Build LLVM @@ -97,7 +111,7 @@ runs: - uses: actions/cache/save@v4 if: inputs.build-llvm == 'true' && steps.cache-llvm.outputs.cache-hit != 'true' with: - path: ${{ github.workspace }}/build/llvm-project-install + path: build/llvm-project-install key: ${{ steps.cache-llvm.outputs.cache-primary-key }} - name: Set environment variable for CMake @@ -133,12 +147,15 @@ runs: exit 0 fi - echo "✅ ccache found on self-hosted runner - setting up local caching" + echo "✅ ccache found on self-hosted runner - setting up persistent caching" - # Set ccache directory (local temp directory) - ccache_dir="${{ github.workspace }}/.ccache-local" + # Set ccache directory to a persistent location outside workspace + # Use runner temp directory with a unique path per repo/compiler/platform + ccache_base_dir="${RUNNER_TEMP:-/tmp}/ccache-slang" + ccache_dir="$ccache_base_dir/${{ inputs.os }}-${{ inputs.compiler }}-${{ inputs.platform }}" mkdir -p "$ccache_dir" echo "CCACHE_DIR=$ccache_dir" >> $GITHUB_ENV + echo "🔧 Using persistent ccache directory: $ccache_dir" # Configure ccache settings for local use only ccache --set-config=max_size=2G @@ -147,7 +164,9 @@ runs: ccache --set-config=sloppiness=pch_defines,time_macros # Enable ccache for CMake (set environment variables) - echo "ccache_symlinks_path=ccache" >> $GITHUB_ENV + # Get the full path to ccache executable + ccache_path=$(which ccache) + echo "ccache_symlinks_path=$ccache_path" >> $GITHUB_ENV # Show initial stats echo "ccache configuration:" |
