Merge pull request #4105 from pleroy/YUSoSlow #1301
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: [ 'master' ] | |
tags: [ '*' ] | |
pull_request_target: | |
branches: [ '*' ] | |
env: | |
PRINCIPIA_MSVC: . | |
PRINCIPIA_KSP_ASSEMBLIES_VERSION: 1.12.5 | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
start: | |
if: github.repository == 'mockingbirdnest/Principia' | |
runs-on: windows-latest | |
steps: | |
- name: Start runners | |
uses: mockingbirdnest/actions/windows/start_runners@main | |
with: | |
client_id: ${{ secrets.PRINCIPIA_BUILD_CLIENT_ID }} | |
tenant_id: ${{ secrets.PRINCIPIA_BUILD_TENANT_ID }} | |
subscription_id: ${{ secrets.PRINCIPIA_BUILD_SUBSCRIPTION_ID }} | |
build: | |
if: github.repository == 'mockingbirdnest/Principia' | |
runs-on: ${{ matrix.configuration }} | |
strategy: | |
matrix: | |
configuration: [Debug, Release] | |
steps: | |
- name: Checkout source files | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: | | |
${{ github.event_name == 'pull_request_target' | |
&& format('refs/pull/{0}/merge', github.event.number) | |
|| '' }} | |
- name: Download KSP assemblies | |
uses: mockingbirdnest/actions/windows/download_ksp_assemblies@main | |
with: | |
secret_directory: ${{ secrets.PRINCIPIA_KSP_ASSEMBLIES_DIRECTORY }} | |
ksp_version: ${{ env.PRINCIPIA_KSP_ASSEMBLIES_VERSION }} | |
- name: Initialize build environment | |
uses: mockingbirdnest/actions/windows/initialize_build@main | |
with: | |
configuration: ${{ matrix.configuration }} | |
- name: Download abseil artifact | |
uses: mockingbirdnest/actions/windows/download_artifact@main | |
with: | |
name: abseil-cpp | |
configuration: ${{ matrix.configuration }} | |
directory: Google | |
- name: Download benchmark artifact | |
uses: mockingbirdnest/actions/windows/download_artifact@main | |
with: | |
name: benchmark | |
configuration: ${{ matrix.configuration }} | |
directory: Google | |
- name: Download config artifact | |
uses: mockingbirdnest/actions/windows/download_artifact@main | |
with: | |
name: config | |
configuration: ${{ matrix.configuration }} | |
directory: Boost | |
- name: Download gipfeli artifact | |
uses: mockingbirdnest/actions/windows/download_artifact@main | |
with: | |
name: gipfeli | |
configuration: ${{ matrix.configuration }} | |
directory: Google | |
- name: Download glog artifact | |
uses: mockingbirdnest/actions/windows/download_artifact@main | |
with: | |
name: glog | |
configuration: ${{ matrix.configuration }} | |
directory: Google | |
- name: Download googletest artifact | |
uses: mockingbirdnest/actions/windows/download_artifact@main | |
with: | |
name: googletest | |
configuration: ${{ matrix.configuration }} | |
directory: Google | |
- name: Download multiprecision artifact | |
uses: mockingbirdnest/actions/windows/download_artifact@main | |
with: | |
name: multiprecision | |
configuration: ${{ matrix.configuration }} | |
directory: Boost | |
- name: Download protobuf artifact | |
uses: mockingbirdnest/actions/windows/download_artifact@main | |
with: | |
name: protobuf | |
configuration: ${{ matrix.configuration }} | |
directory: Google | |
- name: Download zfp artifact | |
uses: mockingbirdnest/actions/windows/download_artifact@main | |
with: | |
name: zfp | |
configuration: ${{ matrix.configuration }} | |
directory: 'LLNL' | |
- name: Restore ${{ matrix.configuration }} | |
uses: mockingbirdnest/actions/windows/restore@main | |
with: | |
configuration: ${{ matrix.configuration }} | |
solution_directory: ${{ env.PRINCIPIA_MSVC }} | |
- name: Rebuild ${{ matrix.configuration }} | |
uses: mockingbirdnest/actions/windows/rebuild@main | |
with: | |
configuration: ${{ matrix.configuration }} | |
solution_directory: ${{ env.PRINCIPIA_MSVC }} | |
- name: Test ${{ matrix.configuration }} | |
uses: mockingbirdnest/actions/windows/test@main | |
with: | |
configuration: ${{ matrix.configuration }} | |
- name: Clean stub binaries | |
run: | | |
git reset --hard | |
shell: pwsh | |
- name: Upload principia artifact | |
uses: mockingbirdnest/actions/windows/upload_principia_artifact@main | |
with: | |
configuration: ${{ matrix.configuration }} | |