[GITHUB] Add clang-cl amd64 build to CI

As before, use a matrix for Ninja+Msvc build
This commit is contained in:
Jérôme Gardou 2021-05-03 15:48:53 +02:00 committed by Jérôme Gardou
parent bc92234ea4
commit e9cef3f216

View file

@ -76,116 +76,58 @@ jobs:
name: reactos-${{matrix.compiler}}-${{matrix.arch}}-${{github.sha}} name: reactos-${{matrix.compiler}}-${{matrix.arch}}-${{github.sha}}
path: build/livecd.iso path: build/livecd.iso
build-clang-cl-i386: build-msvc:
name: Clang-CL (i386) strategy:
matrix:
compiler: [msvc, clang-cl]
arch: [i386, amd64]
fail-fast: false
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- name: Install packages - name: Install ninja
run: choco install -y ninja
- name: Install LLVM (x86)
if: ${{ (matrix.compiler == 'clang-cl') && (matrix.arch == 'i386') }}
run: | run: |
choco install ninja -y
choco install --x86 -y llvm choco install --x86 -y llvm
- name: Install Flex and Bison echo "LLVM_PATH=${env:PROGRAMFILES(X86)}\llvm\bin" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Install LLVM (amd64)
if: ${{ (matrix.compiler == 'clang-cl') && (matrix.arch == 'amd64') }}
run: |
choco install -y llvm
echo "LLVM_PATH=${env:PROGRAMFILES}\llvm\bin" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Install Flex & Bison
run: | run: |
curl -O https://svn.reactos.org/storage/vperevertkin/flexbison.7z curl -O https://svn.reactos.org/storage/vperevertkin/flexbison.7z
7z x flexbison.7z -O${{github.workspace}}\bin 7z x flexbison.7z -O${{github.workspace}}\bin
echo "${{github.workspace}}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append echo "${{github.workspace}}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "BISON_PKGDATADIR=${{github.workspace}}\bin\share\bison" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append echo "BISON_PKGDATADIR=${{github.workspace}}\bin\share\bison" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "M4=${{github.workspace}}\bin\m4.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append echo "M4=${{github.workspace}}\bin\m4.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Add CL to PATH - name: Activate VS cmd (x86)
if: ${{ matrix.arch == 'i386' }}
uses: ilammy/msvc-dev-cmd@v1 uses: ilammy/msvc-dev-cmd@v1
with: with:
arch: amd64_x86 arch: amd64_x86
- uses: actions/checkout@v2 - name: Activate VS cmd (amd64)
with: if: ${{ matrix.arch == 'amd64' }}
path: src
- name: Configure
run: |
mkdir build
cd build
$env:PATH = "${env:PROGRAMFILES(X86)}\llvm\bin;$env:PATH"
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=i386 -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1 -DUSE_CLANG_CL:BOOL=1 ${{github.workspace}}\src
- name: Build
working-directory: ${{github.workspace}}\build
run: cmake --build .
- name: Generate ISOs
working-directory: ${{github.workspace}}\build
run: |
cmake --build . --target bootcd
cmake --build . --target livecd
build-msvc-i386:
name: MSVC (i386)
runs-on: windows-latest
steps:
- name: Install packages
run: choco install ninja -y
- name: Install Flex and Bison
run: |
curl -O https://svn.reactos.org/storage/vperevertkin/flexbison.7z
7z x flexbison.7z -O${{github.workspace}}\bin
echo "${{github.workspace}}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "BISON_PKGDATADIR=${{github.workspace}}\bin\share\bison" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "M4=${{github.workspace}}\bin\m4.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Add CL to PATH
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_x86
- uses: actions/checkout@v2
with:
path: src
- name: Configure
run: |
mkdir build
cd build
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=i386 -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1 ${{github.workspace}}\src
- name: Build
working-directory: ${{github.workspace}}\build
run: cmake --build .
- name: Generate ISOs
working-directory: ${{github.workspace}}\build
run: |
cmake --build . --target bootcd
cmake --build . --target livecd
- name: Upload bootcd
uses: actions/upload-artifact@v2
with:
name: reactos-msvc-i386-${{github.sha}}
path: build/bootcd.iso
- name: Upload livecd
uses: actions/upload-artifact@v2
with:
name: reactos-msvc-i386-${{github.sha}}
path: build/livecd.iso
build-msvc-amd64:
name: MSVC (amd64)
runs-on: windows-latest
steps:
- name: Install packages
run: choco install ninja -y
- name: Install Flex and Bison
run: |
curl -O https://svn.reactos.org/storage/vperevertkin/flexbison.7z
7z x flexbison.7z -O${{github.workspace}}\bin
echo "${{github.workspace}}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "BISON_PKGDATADIR=${{github.workspace}}\bin\share\bison" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "M4=${{github.workspace}}\bin\m4.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Add CL to PATH
uses: ilammy/msvc-dev-cmd@v1 uses: ilammy/msvc-dev-cmd@v1
with: with:
arch: amd64 arch: amd64
- uses: actions/checkout@v2 - name: Add LLVM to PATH
if: ${{ matrix.compiler == 'clang-cl' }}
run: echo "${env:LLVM_PATH}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Source checkout
uses: actions/checkout@v2
with: with:
path: src path: src
- name: Create Build directory
run: mkdir build
- name: Configure - name: Configure
run: | working-directory: ${{github.workspace}}\build
mkdir build run: cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=${{matrix.arch}} -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1 -DUSE_CLANG_CL:BOOL=${{matrix.compiler == 'clang-cl'}} ${{github.workspace}}\src
cd build
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=amd64 -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1 ${{github.workspace}}\src
- name: Build - name: Build
working-directory: ${{github.workspace}}\build working-directory: ${{github.workspace}}\build
run: | run: cmake --build .
cmake --build .
- name: Generate ISOs - name: Generate ISOs
working-directory: ${{github.workspace}}\build working-directory: ${{github.workspace}}\build
run: | run: |
@ -194,12 +136,12 @@ jobs:
- name: Upload bootcd - name: Upload bootcd
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: reactos-msvc-amd64-${{github.sha}} name: reactos-${{matrix.compiler}}-${{matrix.arch}}-${{github.sha}}
path: build/bootcd.iso path: build/bootcd.iso
- name: Upload livecd - name: Upload livecd
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: reactos-msvc-amd64-${{github.sha}} name: reactos-${{matrix.compiler}}-${{matrix.arch}}-${{github.sha}}
path: build/livecd.iso path: build/livecd.iso
build-msbuild-i386: build-msbuild-i386: