Browse Source

Add debug configurations to llvm workflows

pull/1906/head
duckdoom5 5 months ago
parent
commit
9b3bdd682d
  1. 24
      .github/workflows/llvm-win.yml
  2. 29
      .github/workflows/llvm.yml

24
.github/workflows/llvm-win.yml

@ -8,18 +8,16 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
config: os: [windows-2022]
- { os: windows-2022, platform: x64, configuration : Debug, vs: "Program Files/Microsoft Visual Studio/2022" } platform: [x64]
- { os: windows-2022, platform: x64, configuration : RelWithDebInfo, vs: "Program Files/Microsoft Visual Studio/2022" } build-cfg: [Debug, RelWithDebInfo, Release]
runs-on: ${{ matrix.config.os }} runs-on: ${{ matrix.os }}
env: env:
CC: ${{ matrix.config.cc }} VS_VERSION: "Program Files/Microsoft Visual Studio/2022"
CXX: ${{ matrix.config.cxx }} PLATFORM: ${{ matrix.platform }}
VS_VERSION: ${{ matrix.config.vs }} BUILD_CONFIGURATION: ${{ matrix.build-cfg }}
PLATFORM: ${{ matrix.config.platform }}
CONFIGURATION: ${{ matrix.config.configuration }}
ACTIONS_ALLOW_UNSECURE_COMMANDS: true ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps: steps:
@ -52,16 +50,16 @@ jobs:
- name: Build LLVM - name: Build LLVM
shell: bash shell: bash
run: build/build.sh build_llvm -platform $PLATFORM -configuration $CONFIGURATION run: build/build.sh build_llvm -platform $PLATFORM -configuration $BUILD_CONFIGURATION
working-directory: C:\CppSharp working-directory: C:\CppSharp
- name: Package LLVM - name: Package LLVM
shell: bash shell: bash
run: build/build.sh package_llvm -platform $PLATFORM -configuration $CONFIGURATION run: build/build.sh package_llvm -platform $PLATFORM -configuration $BUILD_CONFIGURATION
working-directory: C:\CppSharp working-directory: C:\CppSharp
- name: 'Upload Artifact' - name: 'Upload Artifact'
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: llvm name: llvm-${{ matrix.os }}-${{ matrix.platform }}-${{ matrix.build-cfg }}
path: C:\CppSharp\build\llvm\llvm-*-*.* path: C:\CppSharp\build\llvm\llvm-*-*.*

29
.github/workflows/llvm.yml

@ -8,19 +8,17 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
config: os: [ubuntu-22.04, macos-13]
- { os: ubuntu-22.04, platform: x64, cxx: g++-11, cc: gcc-11 } platform: [x64, arm64]
- { os: ubuntu-22.04, platform: arm64, cxx: g++-11, cc: gcc-11 } build-cfg: [Debug, Release]
- { os: macos-11, platform: x64, cxx: clang++, cc: clang }
- { os: macos-12, platform: x64, cxx: clang++, cc: clang }
- { os: macos-12, platform: arm64, cxx: clang++, cc: clang }
runs-on: ${{ matrix.config.os }} runs-on: ${{ matrix.os }}
env: env:
CC: ${{ matrix.config.cc }} CC: ${{ startsWith(matrix.os, 'ubuntu') && 'gcc-11' || 'clang' }}
CXX: ${{ matrix.config.cxx }} CXX: ${{ startsWith(matrix.os, 'ubuntu') && 'g++-11' || 'clang++' }}
PLATFORM: ${{ matrix.config.platform }} PLATFORM: ${{ matrix.platform }}
BUILD_CONFIGURATION: ${{ matrix.build-cfg }}
ACTIONS_ALLOW_UNSECURE_COMMANDS: true ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps: steps:
@ -28,7 +26,7 @@ jobs:
- uses: lukka/get-cmake@latest - uses: lukka/get-cmake@latest
- name: Install cross compilers - name: Install cross compilers
if: startsWith(matrix.config.os, 'ubuntu') && startsWith(matrix.config.platform, 'arm64') if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.platform, 'arm64')
run: sudo apt install -y g++-aarch64-linux-gnu gcc-aarch64-linux-gnu run: sudo apt install -y g++-aarch64-linux-gnu gcc-aarch64-linux-gnu
- name: Clone LLVM - name: Clone LLVM
@ -37,14 +35,15 @@ jobs:
- name: Build LLVM - name: Build LLVM
shell: bash shell: bash
run: build/build.sh build_llvm -platform $PLATFORM run: build/build.sh build_llvm -platform $PLATFORM -configuration $BUILD_CONFIGURATION
- name: Package LLVM - name: Package LLVM
shell: bash shell: bash
run: build/build.sh package_llvm -platform $PLATFORM run: build/build.sh package_llvm -platform $PLATFORM -configuration $BUILD_CONFIGURATION
- name: 'Upload Artifact' - name: 'Upload Artifact'
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: llvm name: llvm-${{ matrix.os }}-${{ matrix.platform }}-${{ matrix.build-cfg }}
overwrite: true
path: build/llvm/llvm-*-*.* path: build/llvm/llvm-*-*.*

Loading…
Cancel
Save