@@ -43,13 +43,13 @@ jobs:
4343 runs-on : " windows-tensorrt-llm-cuda-12-2"
4444 run-e2e : false
4545 s3-key-prefix : " windows-tensorrt-llm-ccache"
46- sccache-conf-path : ' C:\sccache.conf '
46+ ccache-dir : ' C:\Users\ContainerAdministrator\AppData\Local\ccache '
4747 - os : " linux"
4848 name : " cuda-12-3"
4949 runs-on : " linux-tensorrt-llm-cuda-12-3"
5050 run-e2e : false
51- s3-key-prefix : " linux-tensorrt-llm"
52- sccache-conf-path : ' /tmp/sccache.conf '
51+ s3-key-prefix : " linux-tensorrt-llm-0-9-0-cuda-12-3 "
52+ ccache-dir : " /home/runner/.ccache "
5353 permissions :
5454 contents : write
5555 steps :
@@ -60,51 +60,34 @@ jobs:
6060 submodules : recursive
6161 lfs : true
6262
63- - name : Install choco on Windows
63+ - name : Install tools on Windows
6464 if : runner.os == 'Windows'
6565 run : |
66- choco install make pkgconfiglite ccache awscli -y
66+ choco install make pkgconfiglite ccache awscli 7zip -y
67+ Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
68+ refreshenv
6769
68- - name : create sccache.conf file Linux
69- if : runner.os == 'Linux'
70- run : |
71- echo "[cache.s3]" > ${{ matrix.sccache-conf-path }}
72- echo 'bucket = "${{ secrets.MINIO_BUCKET_NAME }}"' >> ${{ matrix.sccache-conf-path }}
73- echo 'endpoint = "${{ secrets.MINIO_ENDPOINT }}"' >> ${{ matrix.sccache-conf-path }}
74- echo 'key_prefix = "${{ matrix.s3-key-prefix }}"' >> ${{ matrix.sccache-conf-path }}
75- echo 'use_ssl = false' >> ${{ matrix.sccache-conf-path }}
76- echo 'server_side_encryption = false' >> ${{ matrix.sccache-conf-path }}
77- echo 'no_credentials = false' >> ${{ matrix.sccache-conf-path }}
78-
7970 - name : Download ccache from s3
80- continue-on-error : true
8171 if : runner.os == 'Windows'
72+ continue-on-error : true
8273 run : |
8374 Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
8475 refreshenv
85- aws s3 cp s3://${{ secrets.MINIO_BUCKET_NAME }}/${{ matrix.s3-key-prefix }} C:\Users\ContainerAdministrator\AppData\Local\ ccache --recursive --endpoint ${{ secrets.MINIO_ENDPOINT }}
76+ aws s3 cp s3://${{ secrets.MINIO_BUCKET_NAME }}/${{ matrix.s3-key-prefix }} ${{ matrix. ccache-dir }} --recursive --endpoint ${{ secrets.MINIO_ENDPOINT }}
8677 env :
8778 AWS_ACCESS_KEY_ID : " ${{ secrets.MINIO_ACCESS_KEY_ID }}"
8879 AWS_SECRET_ACCESS_KEY : " ${{ secrets.MINIO_SECRET_ACCESS_KEY }}"
8980 AWS_DEFAULT_REGION : " ${{ secrets.MINIO_REGION }}"
9081
91- - name : start sccache server for linux
82+ - name : Download ccache from s3
9283 if : runner.os == 'Linux'
93- working-directory : cpp
84+ continue-on-error : true
9485 run : |
95- sccache --start-server
86+ aws s3 cp s3://${{ secrets.MINIO_BUCKET_NAME }}/${{ matrix.s3-key-prefix }} ${{ matrix.ccache-dir }} --recursive --endpoint ${{ secrets.MINIO_ENDPOINT }}
9687 env :
97- SCCACHE_BUCKET : " ${{ secrets.MINIO_BUCKET_NAME }}"
98- SCCACHE_REGION : " ${{ secrets.MINIO_REGION }}"
99- SCCACHE_ENDPOINT : " ${{ secrets.MINIO_ENDPOINT }}"
100- SCCACHE_S3_USE_SSL : " false"
101- SCCACHE_S3_SERVER_SIDE_ENCRYPTION : " false"
102- SCCACHE_S3_KEY_PREFIX : " ${{ matrix.s3-key-prefix }}"
103- SCCACHE_LOG : " debug"
104- SCCACHE_CONF : ' ${{ matrix.sccache-conf-path }}'
10588 AWS_ACCESS_KEY_ID : " ${{ secrets.MINIO_ACCESS_KEY_ID }}"
10689 AWS_SECRET_ACCESS_KEY : " ${{ secrets.MINIO_SECRET_ACCESS_KEY }}"
107- SCCACHE_IDLE_TIMEOUT : " 0 "
90+ AWS_DEFAULT_REGION : " ${{ secrets.MINIO_REGION }} "
10891
10992 - name : Build Dependencies
11093 working-directory : cpp
@@ -141,25 +124,29 @@ jobs:
141124 asset_path : cpp/tensorrt_llm/cortex.tensorrt-llm/cortex.tensorrt-llm.tar.gz
142125 asset_name : cortex.tensorrt-llm-${{ needs.create-draft-release.outputs.version }}-${{ matrix.os }}-${{ matrix.name }}.tar.gz
143126 asset_content_type : application/gzip
144-
145- - name : Clean
146- if : always()
147- continue-on-error : true
148- run : |
149- sccache --stop-server
150- rm ${{ matrix.sccache-conf-path }}
151127
152128 - name : Upload ccache to s3
153129 continue-on-error : true
154130 if : always() && runner.os == 'Windows'
155131 run : |
156132 Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
157133 refreshenv
158- aws s3 cp C:\Users\ContainerAdministrator\AppData\Local\ ccache s3://${{ secrets.MINIO_BUCKET_NAME }}/${{ matrix.s3-key-prefix }} --recursive --endpoint ${{ secrets.MINIO_ENDPOINT }}
134+ aws s3 cp ${{ matrix. ccache-dir }} s3://${{ secrets.MINIO_BUCKET_NAME }}/${{ matrix.s3-key-prefix }} --recursive --endpoint ${{ secrets.MINIO_ENDPOINT }}
159135 env :
160136 AWS_ACCESS_KEY_ID : " ${{ secrets.MINIO_ACCESS_KEY_ID }}"
161137 AWS_SECRET_ACCESS_KEY : " ${{ secrets.MINIO_SECRET_ACCESS_KEY }}"
162138 AWS_DEFAULT_REGION : " ${{ secrets.MINIO_REGION }}"
139+
140+ - name : Upload ccache to s3
141+ continue-on-error : true
142+ if : always() && runner.os == 'Linux'
143+ run : |
144+ aws s3 cp ${{ matrix.ccache-dir }} s3://${{ secrets.MINIO_BUCKET_NAME }}/${{ matrix.s3-key-prefix }} --recursive --endpoint ${{ secrets.MINIO_ENDPOINT }}
145+ env :
146+ AWS_ACCESS_KEY_ID : " ${{ secrets.MINIO_ACCESS_KEY_ID }}"
147+ AWS_SECRET_ACCESS_KEY : " ${{ secrets.MINIO_SECRET_ACCESS_KEY }}"
148+ AWS_DEFAULT_REGION : " ${{ secrets.MINIO_REGION }}"
149+
163150 update_release_draft :
164151 needs : [build-and-test]
165152 permissions :
@@ -183,10 +170,3 @@ jobs:
183170 # disable-autolabeler: true
184171 env :
185172 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
186-
187- - name : Clean
188- if : always()
189- continue-on-error : true
190- run : |
191- sccache --stop-server
192- rm ${{ matrix.sccache-conf-path }}
0 commit comments