From 1243b3b784778a5c95188930c01072d194987a69 Mon Sep 17 00:00:00 2001 From: Andrew Rogers Date: Wed, 31 Jul 2024 12:26:14 -0700 Subject: [PATCH] [android] split-out regsgen2 build as ds_tools --- .github/workflows/swift-toolchain.yml | 61 ++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 2 deletions(-) diff --git a/.github/workflows/swift-toolchain.yml b/.github/workflows/swift-toolchain.yml index 5155cee8..a99d701f 100644 --- a/.github/workflows/swift-toolchain.yml +++ b/.github/workflows/swift-toolchain.yml @@ -476,10 +476,53 @@ jobs: ${{ github.workspace }}/BinaryCache/icu-tools-69.1/pkgdata.exe ${{ github.workspace }}/BinaryCache/icu-tools-69.1/genccode.exe - ds2: + ds2_tools: needs: [context] runs-on: ${{ needs.context.outputs.windows_build_runner }} + steps: + - uses: actions/checkout@v4 + with: + repository: compnerd/ds2 + ref: ${{ needs.context.outputs.ds2_revision }} + path: ${{ github.workspace }}/SourceCache/ds2 + show-progress: false + + - uses: compnerd/gha-setup-vsdevenv@main + with: + host_arch: amd64 + components: 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64' + arch: amd64 + + - name: Install Flex and Bison Tools + run: choco install winflexbison3 + + - name: Configure RegsGen2 + run: | + cmake -B ${{ github.workspace }}/BinaryCache/RegsGen2 ` + -C ${{ github.workspace }}/cmake/caches/MSVCWarnings.cmake ` + -D CMAKE_C_COMPILER=cl ` + -D CMAKE_CXX_COMPILER=cl ` + -D CMAKE_C_FLAGS="${{ needs.context.outputs.WINDOWS_CMAKE_C_FLAGS }}" ` + -D CMAKE_CXX_FLAGS="${{ needs.context.outputs.WINDOWS_CMAKE_CXX_FLAGS }}" ` + -D CMAKE_MT=mt ` + -A x64 ` + -G Ninja ` + -S ${{ github.workspace }}/Tools/RegsGen2 + + - name: Build RegsGen2 + run: cmake --build ${{ github.workspace }}/BinaryCache/RegsGen2 --config Release + + - uses: actions/upload-artifact@v4 + with: + name: windows-regsgen2 + path: | + ${{ github.workspace }}/BinaryCache/RegsGen2/Release/regsgen2.exe + + ds2: + needs: [context, ds2_tools] + runs-on: ${{ needs.context.outputs.windows_build_runner }} + strategy: fail-fast: false matrix: @@ -530,10 +573,16 @@ jobs: with: host_arch: amd64 components: 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64' + arch: ${{ matrix.arch }} - name: Install Flex and Bison Tools run: choco install winflexbison3 + - uses: actions/download-artifact@v4 + with: + name: windows-regsgen2 + path: ${{ github.workspace }}/BinaryCache/RegsGen2/Release + - uses: nttld/setup-ndk@v1 id: setup-ndk with: @@ -551,13 +600,16 @@ jobs: -D CMAKE_MT=mt ` -D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/DebugServer2 ` -D MSVC_C_ARCHITECTURE_ID=${{ matrix.arch }} ` + -D DS2_REGSGEN2=${{ github.workspace }}/BinaryCache/RegsGen2/Release/regsgen2.exe ` -D CMAKE_SYSTEM_NAME=${{ matrix.os }} ` -D CMAKE_ANDROID_NDK=$NDKPATH ` ${{ matrix.extra_flags }} ` -G Ninja ` -S ${{ github.workspace }}/SourceCache/ds2 + - name: Build DS2 run: cmake --build ${{ github.workspace }}/BinaryCache/ds2 + - name: Install DS2 run: cmake --build ${{ github.workspace }}/BinaryCache/ds2 --target install @@ -1574,7 +1626,7 @@ jobs: sdk: continue-on-error: ${{ matrix.arch != 'amd64' }} - needs: [context, icu, libxml2, curl, zlib, compilers, cmark_gfm] + needs: [context, icu, libxml2, curl, zlib, ds2, compilers, cmark_gfm] runs-on: ${{ needs.context.outputs.windows_build_runner }} strategy: @@ -1699,6 +1751,11 @@ jobs: with: name: zlib-${{ matrix.os }}-${{ matrix.arch }}-1.3 path: ${{ github.workspace }}/BuildRoot/Library/zlib-1.3/usr + - uses: actions/download-artifact@v4 + if: matrix.os == 'Android' + with: + name: ds2-${{ matrix.os }}-${{ matrix.arch }} + path: ${{ github.workspace }}/BuildRoot/Library/DebugServer2/bin/ds2 - name: Download Compilers uses: actions/download-artifact@v4 with: