Skip to content

Commit

Permalink
[GITHUB] Speed up build
Browse files Browse the repository at this point in the history
  • Loading branch information
binarymaster committed Feb 4, 2025
1 parent a89deaa commit 34173c2
Showing 1 changed file with 8 additions and 232 deletions.
240 changes: 8 additions & 232 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ jobs:
build-linux:
strategy:
matrix:
compiler: [gcc, clang]
arch: [i386, amd64]
config: [Debug, Release]
dllver: ['0x502', '0x600']
compiler: [gcc]
arch: [i386]
config: [Debug]
dllver: ['0x502']
exclude:
- dllver: 0x600
compiler: clang
Expand Down Expand Up @@ -71,6 +71,8 @@ jobs:
run: echo 'cmake --build ${{github.workspace}}/build -- -k0' | ${{github.workspace}}/RosBE-CI/RosBE.sh . 0 ${{matrix.arch}}
- name: Generate ISOs
run: echo 'cmake --build ${{github.workspace}}/build --target bootcd --target livecd' | ${{github.workspace}}/RosBE-CI/RosBE.sh . 0 ${{matrix.arch}}
- name: Generate PC-98 boot floppy
run: echo 'cmake --build ${{github.workspace}}/build --target pc98bootfdd' | ${{github.workspace}}/RosBE-CI/RosBE.sh . 0 ${{matrix.arch}}
- name: Print ccache statistics
run: ccache -s
- name: Upload ISOs
Expand All @@ -80,231 +82,5 @@ jobs:
path: |
build/bootcd.iso
build/livecd.iso
build-msvc:
strategy:
matrix:
os: [windows-latest]
toolset: ['14','14.2'] # VS 2022, and 2019 (see below)
arch: [i386, amd64]
config: [Debug, Release]
dllver: ['0x502', '0x600']
exclude: # Build NT6 ISOs only with the latest toolset when compiled as a debug build
- dllver: 0x600
toolset: 14.2
- dllver: 0x600
config: Release
fail-fast: false
runs-on: ${{matrix.os}}
steps:
- name: Install ninja
run: choco install -y ninja
- name: Install Flex & 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: Activate VS cmd (x86)
if: ${{ matrix.arch == 'i386' }}
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_x86
toolset: ${{matrix.toolset}}
- name: Activate VS cmd (amd64)
if: ${{ matrix.arch == 'amd64' }}
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
toolset: ${{matrix.toolset}}
- name: Source checkout
uses: actions/checkout@v4
with:
path: src
- name: Configure
run: cmake -S src -B build -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=${{matrix.arch}} -DCMAKE_BUILD_TYPE=${{matrix.config}} -DDLL_EXPORT_VERSION=${{matrix.dllver}} -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1
- name: Build
run: cmake --build build -- -k0
- name: Generate ISOs
run: cmake --build build --target bootcd --target livecd
- name: Upload ISOs
uses: actions/upload-artifact@v4
with:
name: reactos-msvc${{matrix.toolset}}-${{matrix.arch}}-${{matrix.config}}-${{matrix.dllver}}-${{github.sha}}
path: |
build/bootcd.iso
build/livecd.iso
- name: Upload debug symbols
if: ${{ matrix.config == 'Debug' }}
uses: actions/upload-artifact@v4
with:
name: reactos-syms-msvc${{matrix.toolset}}-${{matrix.arch}}-${{matrix.config}}-${{matrix.dllver}}-${{github.sha}}
path: build/msvc_pdb

build-msvc-arm:
strategy:
matrix:
toolset: ['14','14.2'] # VS 2022, 2019
arch: [arm, arm64]
config: [Debug, Release]
fail-fast: false
runs-on: windows-latest
steps:
- name: Install ninja
run: choco install -y ninja
- name: Install Flex & 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: Activate VS cmd (arm)
if: ${{ matrix.arch == 'arm' }}
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_arm
sdk: 10.0.22621.0 # Windows SDK 10.0.26100.0 dropped support for 32-bit ARM
toolset: ${{matrix.toolset}}
- name: Activate VS cmd (arm64)
if: ${{ matrix.arch == 'arm64' }}
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_arm64
toolset: ${{matrix.toolset}}
- name: Source checkout
uses: actions/checkout@v4
with:
path: src
- name: Configure
run: cmake -S src -B build -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=${{matrix.arch}} -DCMAKE_BUILD_TYPE=${{matrix.config}} -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1
- name: Build base module
if: ${{ matrix.arch == 'arm' }}
run: cmake --build build --target base/all
- name: Build control panel applets
if: ${{ matrix.arch == 'arm' }}
run: cmake --build build --target dll/cpl/all
- name: Build rosapps
if: ${{ matrix.arch == 'arm' }}
run: cmake --build build --target modules/rosapps/all
- name: Build subsystems
if: ${{ matrix.arch == 'arm' }}
run: cmake --build build --target subsystems/all
- name: Build some applications (arm64)
if: ${{ matrix.arch == 'arm64' }}
run: cmake --build build --target calc magnify mstsc notepad osk regedit taskmgr winmine wordpad base/applications/screensavers/all -- -k0
- name: Upload compiled binaries
uses: actions/upload-artifact@v4
with:
name: reactos-msvc${{matrix.toolset}}-${{matrix.arch}}-${{matrix.config}}-${{github.sha}}
path: |
build/base
build/dll/cpl
build/modules/rosapps
build/subsystems
!**/CMakeFiles
!**/cmake_install.cmake
!**/*.asm
!**/*.bin
!**/*.c
!**/*.def
!**/*.exp
!**/*.h
!**/*.lib
!**/*.mc
!**/*.obj
!**/*.rc
!**/*.tlb
- name: Upload debug symbols
if: ${{ matrix.config == 'Debug' }}
uses: actions/upload-artifact@v4
with:
name: reactos-syms-msvc${{matrix.toolset}}-${{matrix.arch}}-${{matrix.config}}-${{github.sha}}
path: build/msvc_pdb

# FIXME: Does not boot on toolset 14.1, 14.3+ is untested
build-clang-cl:
strategy:
matrix:
arch: [i386, amd64]
config: [Debug, Release]
fail-fast: false
runs-on: windows-latest
steps:
- name: Install ninja
run: choco install -y ninja
- name: Install LLVM
run: |
choco install -y --allow-downgrade llvm --version 13.0.1
echo "LLVM_PATH=${env:PROGRAMFILES}\llvm\bin" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Install Flex & 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: Activate VS cmd (x86)
if: ${{ matrix.arch == 'i386' }}
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_x86
toolset: '14'
- name: Activate VS cmd (amd64)
if: ${{ matrix.arch == 'amd64' }}
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
toolset: '14'
- name: Add LLVM to PATH
run: echo "${env:LLVM_PATH}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Source checkout
uses: actions/checkout@v4
with:
path: src
- name: Configure
run: cmake -S src -B build -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=${{matrix.arch}} -DCMAKE_BUILD_TYPE=${{matrix.config}} -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1 -DUSE_CLANG_CL:BOOL=TRUE
- name: Build
run: cmake --build build -- -k0
- name: Generate ISOs
run: cmake --build build --target bootcd --target livecd
- name: Upload ISOs
uses: actions/upload-artifact@v4
with:
name: reactos-clang-cl-${{matrix.arch}}-${{matrix.config}}-${{github.sha}}
path: |
build/bootcd.iso
build/livecd.iso
- name: Upload debug symbols
if: ${{ matrix.config == 'Debug' }}
uses: actions/upload-artifact@v4
with:
name: reactos-syms-clang-cl-${{matrix.arch}}-${{matrix.config}}-${{github.sha}}
path: build/msvc_pdb

build-msbuild-i386:
name: MSBuild (i386)
runs-on: windows-latest
steps:
- 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@v4
with:
path: src
- name: Configure
run: |
mkdir build
cd build
cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=i386 -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1 ${{github.workspace}}\src
- name: Build
run: cmake --build ${{github.workspace}}\build --target bootcd --target livecd
build/PC98/ReactOS-98.IMG
build/RAM/ramcd.iso

0 comments on commit 34173c2

Please sign in to comment.