8282 generator : ' Visual Studio 17 2022'
8383 cmake_flags : ' -DCMAKE_CONFIGURATION_TYPES="Release"'
8484 runs-on : ${{matrix.os}}
85+ env :
86+ SCCACHE_GHA_ENABLED : true
87+ SCCACHE_GCS_BUCKET : or-tools-github-remote-caching
88+ SCCACHE_GCS_KEY_PREFIX : cmake
89+ SCCACHE_GCS_RW_MODE : READ_WRITE
8590 steps :
8691 - uses : actions/checkout@v6
92+ - uses : ' google-github-actions/auth@v3'
93+ with :
94+ credentials_json : ' ${{secrets.GCP_BUCKET_API_KEY}}'
95+ - name : Run sccache-cache
96+ uses : mozilla-actions/sccache-action@v0.0.10
97+ env :
98+ SCCACHE_GCS_KEY_PATH : ${{env.GOOGLE_GHA_CREDS_PATH}}
8799 - uses : actions/setup-java@v5
88100 if : ${{ matrix.build == 'java' }}
89101 with :
@@ -94,10 +106,10 @@ jobs:
94106 python-version : ${{env.PYTHON_VERSION}}
95107 - name : Setup linux
96108 if : ${{ matrix.platform == 'linux' }}
97- run : sudo apt install -y ninja-build ccache swig
109+ run : sudo apt install -y ninja-build swig
98110 - name : Setup macos
99111 if : ${{ matrix.platform == 'macos' }}
100- run : brew install ccache swig
112+ run : brew install swig
101113 - name : Setup Linux Python Env
102114 if : ${{ matrix.build == 'python' && matrix.platform == 'linux' }}
103115 run : echo "$HOME/.local/bin" >> $GITHUB_PATH
@@ -124,6 +136,8 @@ jobs:
124136 -DUSE_GLPK=OFF
125137 -DUSE_HIGHS=OFF
126138 -DUSE_SCIP=OFF
139+ -DCMAKE_C_COMPILER_LAUNCHER=${{env.SCCACHE_PATH}}
140+ -DCMAKE_CXX_COMPILER_LAUNCHER=${{env.SCCACHE_PATH}}
127141 - name : Build
128142 run : cmake --build build --config Release -j --target ${{ matrix.generator == 'Ninja' && 'all' || 'ALL_BUILD'}}
129143 - name : Test
0 commit comments