Skip to content

Commit

Permalink
[CI] exclude builds that match debug+portable, and all of WinXP's deb…
Browse files Browse the repository at this point in the history
…ug and portable builds. (#1169)
  • Loading branch information
Razish authored Oct 6, 2023
1 parent c9d3e97 commit ffadf53
Showing 1 changed file with 25 additions and 22 deletions.
47 changes: 25 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ on:
push:
branches: [master]
paths-ignore:
- '**.md'
- '*.txt'
- '.gitignore'
- 'docs/*'
- "**.md"
- "*.txt"
- ".gitignore"
- "docs/*"
pull_request:
branches: [master]
paths-ignore:
- '**.md'
- '*.txt'
- '.gitignore'
- 'docs/*'
- "**.md"
- "*.txt"
- ".gitignore"
- "docs/*"
release:
types: [published]

Expand All @@ -28,6 +28,9 @@ jobs:
arch: [x86, x86_64]
build_type: [Debug, Release]
portable: [Portable, Non-Portable]
exclude:
- build_type: Debug
portable: Portable
include:
- arch: x86
platform: Win32
Expand Down Expand Up @@ -60,13 +63,13 @@ jobs:
run: cmake --build . --config ${{ matrix.build_type }}

- name: Install
if: ${{ matrix.build_type == 'Release' }}
if: ${{ matrix.build_type == 'Release' }}
working-directory: ${{ runner.workspace }}/build
shell: bash
run: cmake --install . --config ${{ matrix.build_type }}

- uses: actions/upload-artifact@v3
if: ${{ matrix.build_type == 'Release' }}
if: ${{ matrix.build_type == 'Release' }}
with:
name: OpenJK-windows-${{ matrix.arch }}-${{ matrix.build_type }}-${{ matrix.portable }}
path: ${{ runner.workspace }}/build/bin
Expand All @@ -78,8 +81,8 @@ jobs:
strategy:
matrix:
arch: [x86, x86_64]
build_type: [Debug, Release]
portable: [Portable, Non-Portable]
build_type: [Release]
portable: [Non-Portable]
include:
- arch: x86
platform: Win32
Expand Down Expand Up @@ -126,14 +129,14 @@ jobs:
run: cmake --build . --config ${{ matrix.build_type }}

- name: Install
if: ${{ matrix.build_type == 'Release' }}
if: ${{ matrix.build_type == 'Release' }}
working-directory: ${{ runner.workspace }}/build
shell: bash
run: |
cmake --install . --config ${{ matrix.build_type }}
- uses: actions/upload-artifact@v3
if: ${{ matrix.build_type == 'Release' }}
if: ${{ matrix.build_type == 'Release' }}
with:
name: OpenJK-windowsxp-${{ matrix.arch }}-${{ matrix.build_type }}-${{ matrix.portable }}
path: ${{ runner.workspace }}/build/bin
Expand Down Expand Up @@ -176,7 +179,7 @@ jobs:
else
OPTIONS="-DUseInternalLibs=OFF -DBuildPortableVersion=OFF -DCMAKE_INSTALL_PREFIX=${{ runner.workspace }}/install"
fi
if [ ${{ matrix.arch }} == "x86" ]; then
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} $OPTIONS -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchains/linux-i686.cmake
else
Expand All @@ -189,7 +192,7 @@ jobs:
run: cmake --build .

- name: Install
if: ${{ matrix.build_type == 'Release' }}
if: ${{ matrix.build_type == 'Release' }}
working-directory: ${{ runner.workspace }}/build
shell: bash
run: cmake --install .
Expand All @@ -202,12 +205,12 @@ jobs:
if [ ${{ matrix.arch }} == "x86" ]; then
chmod +x openjk.i386
else
chmod +x openjk.${{ matrix.arch }}
chmod +x openjk.${{ matrix.arch }}
fi
tar -czvf OpenJK-linux-${{ matrix.arch }}-${{ matrix.build_type }}-${{ matrix.portable }}.tar.gz *
- uses: actions/upload-artifact@v3
if: ${{ matrix.build_type == 'Release' }}
if: ${{ matrix.build_type == 'Release' }}
with:
name: OpenJK-linux-${{ matrix.arch }}-${{ matrix.build_type }}-${{ matrix.portable }}
path: ${{runner.workspace}}/install/JediAcademy/OpenJK-linux-${{ matrix.arch }}-${{ matrix.build_type }}-${{ matrix.portable }}.tar.gz
Expand Down Expand Up @@ -248,21 +251,21 @@ jobs:
run: cmake --build .

- name: Install
if: ${{ matrix.build_type == 'Release' }}
if: ${{ matrix.build_type == 'Release' }}
working-directory: ${{ runner.workspace }}/build
shell: bash
run: cmake --install .

- name: Create binary archive
if: ${{ matrix.build_type == 'Release' }}
if: ${{ matrix.build_type == 'Release' }}
working-directory: ${{ runner.workspace }}/install/JediAcademy
shell: bash
run: |
chmod +x openjk.x86_64.app/Contents/MacOS/openjk.x86_64
tar -czvf openjk-macos-${{ matrix.arch }}-${{ matrix.build_type }}-${{ matrix.portable }}.tar.gz *
- uses: actions/upload-artifact@v3
if: ${{ matrix.build_type == 'Release' }}
if: ${{ matrix.build_type == 'Release' }}
with:
name: OpenJK-macos-${{ matrix.arch }}-${{ matrix.build_type }}-${{ matrix.portable }}
path: ${{ runner.workspace }}/install/JediAcademy/openjk-macos-${{ matrix.arch }}-${{ matrix.build_type }}-${{ matrix.portable }}.tar.gz
Expand Down

0 comments on commit ffadf53

Please sign in to comment.