Skip to content

Commit

Permalink
gha: speedup compilation with ninja.
Browse files Browse the repository at this point in the history
  • Loading branch information
nekonomicon committed Dec 8, 2023
1 parent 61a16bc commit 8cfe7a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
CXX: ${{ matrix.cxx }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v3 seanmiddleditch/gha-setup-ninja@v3
with:
submodules: recursive

Expand Down Expand Up @@ -52,13 +52,13 @@ jobs:
- name: Build on Linux
if: startsWith(matrix.os, 'ubuntu')
run: |
schroot --chroot steamrt_scout_i386 -- cmake -B build -S . -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined" -DCMAKE_INSTALL_PREFIX="$PWD/dist"
schroot --chroot steamrt_scout_i386 -- cmake -G "Ninja" -B build -S . -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined" -DCMAKE_INSTALL_PREFIX="$PWD/dist"
schroot --chroot steamrt_scout_i386 -- cmake --build build --target all
schroot --chroot steamrt_scout_i386 -- cmake --build build --target install
- name: Build on Linux with vgui
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.cc, 'gcc')
run: |
schroot --chroot steamrt_scout_i386 -- cmake -B build-vgui -S . -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined" -DUSE_VGUI=ON -DCMAKE_INSTALL_PREFIX="$PWD/dist-vgui"
schroot --chroot steamrt_scout_i386 -- cmake -G "Ninja" -B build-vgui -S . -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined" -DUSE_VGUI=ON -DCMAKE_INSTALL_PREFIX="$PWD/dist-vgui"
cp vgui_support/vgui-dev/lib/vgui.so build-vgui/cl_dll
schroot --chroot steamrt_scout_i386 -- cmake --build build-vgui --target all
schroot --chroot steamrt_scout_i386 -- cmake --build build-vgui --target install
Expand All @@ -69,12 +69,12 @@ jobs:
- name: Build on Windows
if: startsWith(matrix.os, 'windows')
run: |
cmake -G "Visual Studio 16 2019" -A Win32 -B build -DCMAKE_INSTALL_PREFIX="dist"
cmake -G "Ninja" -A Win32 -B build -DCMAKE_INSTALL_PREFIX="dist"
msbuild -verbosity:normal /property:Configuration=Release build/INSTALL.vcxproj
- name: Build on Windows with vgui
if: startsWith(matrix.os, 'windows')
run: |
cmake -G "Visual Studio 16 2019" -A Win32 -B build -DUSE_VGUI=ON -DCMAKE_INSTALL_PREFIX="dist-vgui"
cmake -G "Ninja" -A Win32 -B build -DUSE_VGUI=ON -DCMAKE_INSTALL_PREFIX="dist-vgui"
msbuild -verbosity:normal /property:Configuration=Release build/INSTALL.vcxproj
- name: Extract branch name
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
CXX: ${{ matrix.cxx }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v3 seanmiddleditch/gha-setup-ninja@v3
with:
submodules: recursive

Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Build on Linux
if: startsWith(matrix.os, 'ubuntu')
run: |
schroot --chroot steamrt_scout_i386 -- cmake -B build -S . -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined" -DCMAKE_BUILD_TYPE=${{ github.event.inputs.buildtype }} -DCMAKE_INSTALL_PREFIX="$PWD/dist" -DUSE_VGUI=${{ github.event.inputs.usevgui }}
schroot --chroot steamrt_scout_i386 -- cmake -G "Ninja" -B build -S . -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-undefined" -DCMAKE_BUILD_TYPE=${{ github.event.inputs.buildtype }} -DCMAKE_INSTALL_PREFIX="$PWD/dist" -DUSE_VGUI=${{ github.event.inputs.usevgui }}
schroot --chroot steamrt_scout_i386 -- cmake --build build --target all
schroot --chroot steamrt_scout_i386 -- cmake --build build --target install
Expand All @@ -77,7 +77,7 @@ jobs:
- name: Build on Windows
if: startsWith(matrix.os, 'windows')
run: |
cmake -G "Visual Studio 16 2019" -A Win32 -B build -DCMAKE_INSTALL_PREFIX="dist" -DUSE_VGUI=${{ github.event.inputs.usevgui }}
cmake -G "Ninja" -A Win32 -B build -DCMAKE_INSTALL_PREFIX="dist" -DUSE_VGUI=${{ github.event.inputs.usevgui }}
msbuild -verbosity:normal /property:Configuration=${{ github.event.inputs.buildtype }} build/INSTALL.vcxproj
- name: Extract branch name
Expand Down

0 comments on commit 8cfe7a3

Please sign in to comment.