Skip to content

Commit

Permalink
[android] split-out regsgen2 build as ds_tools
Browse files Browse the repository at this point in the history
  • Loading branch information
andrurogerz committed Jul 31, 2024
1 parent 20075ca commit 1243b3b
Showing 1 changed file with 59 additions and 2 deletions.
61 changes: 59 additions & 2 deletions .github/workflows/swift-toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 1243b3b

Please sign in to comment.