@@ -16,6 +16,13 @@ inputs:
16
16
runs :
17
17
using : composite
18
18
steps :
19
+ - name : Add bash to PATH
20
+ shell : pwsh
21
+ if : ${{inputs.os == 'windows'}}
22
+ run : |
23
+ Add-Content -Path $env:GITHUB_PATH -Value "C:\\Program Files\\Git\\bin"
24
+ Add-Content -Path $env:GITHUB_PATH -Value "C:\\Program Files\\Git\\usr\\bin"
25
+
19
26
- name : Set up MSVC dev tools on Windows
20
27
uses : ilammy/msvc-dev-cmd@v1
21
28
with :
@@ -59,14 +66,20 @@ runs:
59
66
60
67
# Some useful variables
61
68
config=${{inputs.config}}
62
- Config=$(echo "${{inputs.config}}" | sed 's/debug/Debug/;s/release/Release/')
63
- bin_dir=$(pwd)/build/$Config/bin
64
- lib_dir=$(pwd)/build/$Config/lib
69
+ cmake_config=$(echo "${{inputs.config}}" | sed '
70
+ s/^debug$/Debug/
71
+ s/^release$/Release/
72
+ s/^releaseWithDebugInfo$/RelWithDebInfo/
73
+ s/^minSizeRelease$/MinSizeRel/
74
+ ')
75
+ bin_dir=$(pwd)/build/$cmake_config/bin
76
+ lib_dir=$(pwd)/build/$cmake_config/lib
65
77
echo "config=$config" >> "$GITHUB_ENV"
78
+ echo "cmake_config=$cmake_config" >> "$GITHUB_ENV"
66
79
echo "bin_dir=$bin_dir" >> "$GITHUB_ENV"
67
80
echo "lib_dir=$lib_dir" >> "$GITHUB_ENV"
68
81
69
- # Try to restore a LLVM install, and build it otherwise
82
+ # Try to restore an LLVM install, and build it otherwise
70
83
- uses : actions/cache/restore@v4
71
84
id : cache-llvm
72
85
if : inputs.build-llvm == 'true'
@@ -77,25 +90,17 @@ runs:
77
90
- name : Build LLVM
78
91
if : inputs.build-llvm == 'true' && steps.cache-llvm.outputs.cache-hit != 'true'
79
92
shell : bash
80
- run : ./external/build-llvm.sh --install-prefix "${{ github.workspace }}/build/llvm-project-install"
93
+ run : |
94
+ ./external/build-llvm.sh \
95
+ --install-prefix "${{github.workspace}}/build/llvm-project-install" \
96
+ --repo "https://${{github.token}}@github.com/llvm/llvm-project"
81
97
- uses : actions/cache/save@v4
82
98
if : inputs.build-llvm == 'true' && steps.cache-llvm.outputs.cache-hit != 'true'
83
99
with :
84
100
path : ${{ github.workspace }}/build/llvm-project-install
85
101
key : ${{ steps.cache-llvm.outputs.cache-primary-key }}
86
102
87
- # Run this after building llvm, it's pointless to fill the caches with
88
- # infrequent llvm build products
89
- - name : Set up sccache
90
- uses : hendrikmuhs/ccache-action@v1.2
91
- with :
92
- key : ${{inputs.os}}-${{inputs.compiler}}-${{inputs.platform}}-${{inputs.config}}
93
- variant : sccache
94
- # Opportunistically use sccache, it's not available for example on self
95
- # hosted runners or ARM
96
- continue-on-error : true
97
-
98
- - name : Set environment variable for CMake
103
+ - name : Set environment variable for CMake and sccache
99
104
shell : bash
100
105
run : |
101
106
if [ "${{inputs.build-llvm}}" == "true" ]; then
@@ -108,9 +113,10 @@ runs:
108
113
echo "CMAKE_CXX_COMPILER_LAUNCHER=sccache" >> "$GITHUB_ENV"
109
114
echo "CMAKE_C_COMPILER_LAUNCHER=sccache" >> "$GITHUB_ENV"
110
115
fi
116
+ echo SCCACHE_IGNORE_SERVER_IO_ERROR=1 >> "$GITHUB_ENV"
111
117
112
118
# Install swiftshader
113
- - uses : robinraju/release-downloader@v1.8
119
+ - uses : robinraju/release-downloader@v1.11
114
120
continue-on-error : true
115
121
with :
116
122
latest : true
0 commit comments