66 paths :
77 [
88 " engine/**" ,
9+ " .github/workflows/cortex-cpp-quality-gate.yml"
910 ]
1011 workflow_dispatch :
1112
@@ -24,19 +25,19 @@ jobs:
2425 - os : " linux"
2526 name : " amd64"
2627 runs-on : " ubuntu-20-04-cuda-12-0"
27- cmake-flags : " -DCORTEX_CPP_VERSION=${{github.event.pull_request.head.sha}} -DCMAKE_BUILD_TEST=ON -DCMAKE_TOOLCHAIN_FILE=/home/runner/actions-runner/_work/cortex.cpp/cortex.cpp/engine/ vcpkg/scripts/buildsystems/vcpkg.cmake"
28+ cmake-flags : " -DCORTEX_CPP_VERSION=${{github.event.pull_request.head.sha}} -DCMAKE_BUILD_TEST=ON -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake"
2829 build-deps-cmake-flags : " "
2930 ccache-dir : ' '
3031 - os : " mac"
3132 name : " amd64"
32- runs-on : " macos-13 "
33- cmake-flags : " -DCORTEX_CPP_VERSION=${{github.event.pull_request.head.sha}} -DCMAKE_BUILD_TEST=ON -DCMAKE_TOOLCHAIN_FILE=/Users/runner/work/cortex.cpp/cortex.cpp/engine/ vcpkg/scripts/buildsystems/vcpkg.cmake"
33+ runs-on : " macos-selfhosted-12 "
34+ cmake-flags : " -DCORTEX_CPP_VERSION=${{github.event.pull_request.head.sha}} -DCMAKE_BUILD_TEST=ON -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake"
3435 build-deps-cmake-flags : " "
3536 ccache-dir : ' '
3637 - os : " mac"
3738 name : " arm64"
38- runs-on : " macos-latest "
39- cmake-flags : " -DCORTEX_CPP_VERSION=${{github.event.pull_request.head.sha}} -DCMAKE_BUILD_TEST=ON -DMAC_ARM64=ON -DCMAKE_TOOLCHAIN_FILE=/Users/runner/work/cortex.cpp/cortex.cpp/engine/ vcpkg/scripts/buildsystems/vcpkg.cmake"
39+ runs-on : " macos-silicon "
40+ cmake-flags : " -DCORTEX_CPP_VERSION=${{github.event.pull_request.head.sha}} -DCMAKE_BUILD_TEST=ON -DMAC_ARM64=ON -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake"
4041 build-deps-cmake-flags : " "
4142 ccache-dir : ' '
4243 - os : " windows"
5152 uses : actions/checkout@v3
5253 with :
5354 submodules : recursive
54-
55+
56+ - name : use python for linux
57+ if : runner.os == 'Linux'
58+ uses : actions/setup-python@v4
59+ with :
60+ python-version : ' 3.9'
61+
62+ - name : Install tools on Linux
63+ if : runner.os == 'Linux'
64+ run : |
65+ python3 -m pip install awscli
66+
5567 - name : Install choco on Windows
5668 if : runner.os == 'Windows'
5769 run : |
6476 Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
6577 refreshenv
6678 aws s3 cp s3://${{ secrets.MINIO_BUCKET_NAME }}/cortex-cpp-${{ matrix.os }}-${{ matrix.name }} ${{ matrix.ccache-dir }} --recursive --endpoint ${{ secrets.MINIO_ENDPOINT }}
79+ aws s3 cp s3://${{ secrets.MINIO_BUCKET_NAME }}/cortex-cpp-vcpkg-windows C:\Users\ContainerAdministrator\AppData\Local\vcpkg --recursive --endpoint ${{ secrets.MINIO_ENDPOINT }}
80+ env :
81+ AWS_ACCESS_KEY_ID : " ${{ secrets.MINIO_ACCESS_KEY_ID }}"
82+ AWS_SECRET_ACCESS_KEY : " ${{ secrets.MINIO_SECRET_ACCESS_KEY }}"
83+ AWS_DEFAULT_REGION : " ${{ secrets.MINIO_REGION }}"
84+
85+ - name : Download vcpkg cache from s3
86+ if : runner.os == 'Linux'
87+ continue-on-error : true
88+ run : |
89+ aws s3 cp s3://${{ secrets.MINIO_BUCKET_NAME }}/cortex-cpp-vcpkg-linux /home/runner/.cache/vcpkg --recursive --endpoint ${{ secrets.MINIO_ENDPOINT }} --cli-read-timeout 0
6790 env :
6891 AWS_ACCESS_KEY_ID : " ${{ secrets.MINIO_ACCESS_KEY_ID }}"
6992 AWS_SECRET_ACCESS_KEY : " ${{ secrets.MINIO_SECRET_ACCESS_KEY }}"
7396 run : |
7497 cd engine
7598 make configure-vcpkg
76-
99+
77100 - name : Build
78101 run : |
79102 cd engine
@@ -100,13 +123,24 @@ jobs:
100123 name : cortex-${{ matrix.os }}-${{ matrix.name }}
101124 path : ./engine/cortex
102125
103- - name : Upload ccache to s3
126+ - name : Upload windows ccache to s3
104127 continue-on-error : true
105128 if : always() && runner.os == 'Windows'
106129 run : |
107130 Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
108131 refreshenv
109132 aws s3 cp ${{ matrix.ccache-dir }} s3://${{ secrets.MINIO_BUCKET_NAME }}/cortex-${{ matrix.os }}-${{ matrix.name }} --recursive --endpoint ${{ secrets.MINIO_ENDPOINT }}
133+ aws s3 cp C:\Users\ContainerAdministrator\AppData\Local\vcpkg s3://${{ secrets.MINIO_BUCKET_NAME }}/cortex-cpp-vcpkg-windows --recursive --endpoint ${{ secrets.MINIO_ENDPOINT }}
134+ env :
135+ AWS_ACCESS_KEY_ID : " ${{ secrets.MINIO_ACCESS_KEY_ID }}"
136+ AWS_SECRET_ACCESS_KEY : " ${{ secrets.MINIO_SECRET_ACCESS_KEY }}"
137+ AWS_DEFAULT_REGION : " ${{ secrets.MINIO_REGION }}"
138+
139+ - name : Upload linux vcpkg cache to s3
140+ continue-on-error : true
141+ if : always() && runner.os == 'Linux'
142+ run : |
143+ aws s3 cp /home/runner/.cache/vcpkg s3://${{ secrets.MINIO_BUCKET_NAME }}/cortex-cpp-vcpkg-linux --recursive --endpoint ${{ secrets.MINIO_ENDPOINT }}
110144 env :
111145 AWS_ACCESS_KEY_ID : " ${{ secrets.MINIO_ACCESS_KEY_ID }}"
112146 AWS_SECRET_ACCESS_KEY : " ${{ secrets.MINIO_SECRET_ACCESS_KEY }}"
0 commit comments