Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Commit

Permalink
combine everything into one action
Browse files Browse the repository at this point in the history
  • Loading branch information
Prevter committed Apr 10, 2024
1 parent 40f1d26 commit 8c772be
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 107 deletions.
44 changes: 0 additions & 44 deletions .github/geode/action.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/standalone/action.yml

This file was deleted.

89 changes: 73 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,85 @@ on:
branches:
- "**"

env:
BUILD_TYPE: RelWithDebInfo

jobs:
build:
strategy:
fail-fast: false
matrix:
config:
- name: Standalone
os: windows-latest
- name: Geode
os: windows-latest

name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
geode:
name: Build Geode Mod
runs-on: ubuntu-latest
steps:
- uses: prevter/openhack/.github/build@lemonade
- uses: actions/checkout@v4
with:
target: ${{ matrix.config.name }}
submodules: recursive

- name: Build the mod
uses: prevter/build-geode-mod@main
with:
combine: true
ccache-variant: ''
export-pdb: true
build-config: ${{env.BUILD_TYPE}}
configure-args: "-DBUILD_STANDALONE=OFF"
target: Geode

package-geode:
name: Package Geode Mod
runs-on: ubuntu-latest
needs: ['geode']

steps:
- uses: prevter/build-geode-mod/combine@main
id: build

- uses: actions/upload-artifact@v4
with:
name: OpenHack-Geode
path: ${{ steps.build.outputs.build-output }}

standalone:
name: Vanilla OpenHack
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Ninja
shell: bash
run: |
curl -L https://github.com/ninja-build/ninja/releases/latest/download/ninja-win.zip -o ninja.zip
7z x ninja.zip -o"$GITHUB_WORKSPACE/ninja"
echo "$GITHUB_WORKSPACE/ninja" >> $GITHUB_PATH
- name: Update LLVM
shell: bash
run: |
curl -L https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/LLVM-17.0.6-win64.exe -o llvm-inst.exe
7z x llvm-inst.exe -ollvm bin/clang.exe bin/clang++.exe bin/lld-link.exe bin/llvm-rc.exe bin/*.dll lib/clang/*/include/*
echo "$GITHUB_WORKSPACE/llvm/bin" >> $GITHUB_PATH
- name: Configure CMake and build
id: build
shell: bash
run: |
mkdir -p $HOME/.sccache
export CFLAGS="--target=i686-windows-msvc"
export CXXFLAGS="--target=i686-windows-msvc"
export LDFLAGS="--target=i686-windows-msvc"
cmake -B build -DBUILD_GEODE=OFF -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -G Ninja -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
cmake --build build --config ${{env.BUILD_TYPE}}
- name: Save artifacts
uses: actions/upload-artifact@v3
with:
name: OpenHack-Standalone
path: ${{github.workspace}}/bin

package:
name: Create Nightly Release
runs-on: ubuntu-latest
needs: ['build']
needs: ['standalone', 'package-geode']

steps:
- uses: actions/download-artifact@v3
Expand Down Expand Up @@ -65,4 +122,4 @@ jobs:
${{ github.workspace }}/bin/OpenHack-Nightly.zip
${{ github.workspace }}/bin/prevter.openhack.geode
${{ github.workspace }}/bin/prevter.openhack.pdb
${{ github.workspace }}/bin/xinput9_1_0.dll
${{ github.workspace }}/bin/xinput9_1_0.dll

0 comments on commit 8c772be

Please sign in to comment.