Skip to content

Commit

Permalink
Merge pull request #7 from OpenGOAL-Mods/rco
Browse files Browse the repository at this point in the history
modbase merge
  • Loading branch information
dallmeyer authored Sep 2, 2024
2 parents aa4717d + 43547ae commit bad4524
Show file tree
Hide file tree
Showing 128 changed files with 23,506 additions and 3,056 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/build-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,46 @@ name: Build
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
merge_group: {}

jobs:
# Windows
build_windows_clang:
name: "🖥️ Windows"
name: "🖥️ Windows (Clang)"
uses: ./.github/workflows/windows-build-clang.yaml
if: github.repository == 'OpenGOAL-Mods/OG-Mod-Base'
with:
cmakePreset: "Release-windows-clang"
cachePrefix: ""
secrets: inherit

build_windows_msvc:
name: "🖥️ Windows"
name: "🖥️ Windows (MSVC)"
uses: ./.github/workflows/windows-build-msvc.yaml
if: github.repository == 'OpenGOAL-Mods/OG-Mod-Base'
with:
cmakePreset: "Release-windows-msvc"
cachePrefix: ""
secrets: inherit

# Linux
build_linux_clang:
name: "🐧 Linux"
name: "🐧 Linux (Clang)"
uses: ./.github/workflows/linux-build-clang.yaml
if: github.repository == 'OpenGOAL-Mods/OG-Mod-Base'
with:
cmakePreset: "Release-linux-clang-asan"
cachePrefix: ""
secrets: inherit

build_linux_gcc:
name: "🐧 Linux"
name: "🐧 Linux (GCC)"
uses: ./.github/workflows/linux-build-gcc.yaml
if: github.repository == 'OpenGOAL-Mods/OG-Mod-Base'
with:
cmakePreset: "Release-linux-gcc"
cachePrefix: ""
Expand All @@ -48,11 +52,12 @@ jobs:
build_macos_intel:
name: "🍎 MacOS"
uses: ./.github/workflows/macos-build.yaml
if: github.repository == 'OpenGOAL-Mods/OG-Mod-Base'
with:
cmakePreset: "Release-macos-clang"
cachePrefix: ""

# Q4 2023 there will hopefully be native arm64 runners
# Q4 2023 there will hopefully be native arm64 runners
# https://github.com/github/roadmap/issues/528
# build_macos_arm:
# name: "🍎 MacOS"
Expand Down
22 changes: 12 additions & 10 deletions .github/workflows/compiler-output-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
libxi-dev zip ninja-build libgl1-mesa-dev libssl-dev
- name: Setup sccache
uses: hendrikmuhs/[email protected].13
uses: hendrikmuhs/[email protected].14
with:
variant: sccache
key: linux-ubuntu-20.04--Release-linux-clang-asan-${{ github.sha }}
Expand All @@ -43,16 +43,9 @@ jobs:
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
- name: Build goalc (master)
run: cmake --build build --parallel $((`nproc`)) --target goalc

- name: Compile and preserve (master)
run: |
./build/goalc/goalc --game jak1 --cmd "(make-group \"all-code\")"
./build/goalc/goalc --game jak2 --cmd "(make-group \"all-code\")"
./build/goalc/goalc --game jak3 --cmd "(make-group \"all-code\")"
mv ./out/jak1/obj ./out/jak1/obj.master
mv ./out/jak2/obj ./out/jak2/obj.master
mv ./out/jak3/obj ./out/jak3/obj.master
cmake --build build --parallel $((`nproc`)) --target goalc
mv ./build ./build.master
- name: Checkout PR
uses: actions/checkout@v4
Expand All @@ -71,6 +64,15 @@ jobs:
- name: Build goalc (PR)
run: cmake --build build --parallel $((`nproc`)) --target goalc

- name: Compile and preserve (master)
run: |
./build.master/goalc/goalc --game jak1 --cmd "(make-group \"all-code\")"
./build.master/goalc/goalc --game jak2 --cmd "(make-group \"all-code\")"
./build.master/goalc/goalc --game jak3 --cmd "(make-group \"all-code\")"
mv ./out/jak1/obj ./out/jak1/obj.master
mv ./out/jak2/obj ./out/jak2/obj.master
mv ./out/jak3/obj ./out/jak3/obj.master
- name: Compile and preserve (PR)
run: |
./build/goalc/goalc --game jak1 --cmd "(make-group \"all-code\")"
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/cut-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ jobs:
metadataAuthors: "barg,SixRock,Dexz"
metadataTags: "speedrunning,challenge,gameplay-mod,rng"
metadataWebsiteUrl: "https://github.com/OpenGOAL-Mods/OG-RCO/blob/main/README.md"
skipMacOS: true
skipLinux: true
toolingBinaryDir: "out/build/Release/bin"
toolingRepo: "OpenGOAL-Mods/OG-Mod-Base"
gameAssetsDir: "game/assets"
copyEntireBinaryDir: true
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
35 changes: 0 additions & 35 deletions .github/workflows/draft-new-release.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/linux-build-clang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
libudev-dev libopenal-dev libflac-dev libogg-dev libvorbis-dev
- name: Setup sccache
uses: hendrikmuhs/[email protected].13
uses: hendrikmuhs/[email protected].14
with:
variant: sccache
key: linux-ubuntu-20.04-${{ inputs.cachePrefix }}-${{ inputs.cmakePreset }}-${{ github.sha }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linux-build-gcc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
sudo update-alternatives --set g++ /usr/bin/g++-10
- name: Setup sccache
uses: hendrikmuhs/[email protected].13
uses: hendrikmuhs/[email protected].14
with:
variant: sccache
key: linux-ubuntu-20.04-${{ inputs.cachePrefix }}-${{ inputs.cmakePreset }}-${{ github.sha }}
Expand All @@ -54,5 +54,5 @@ jobs:
- name: Build Project
run: cmake --build build --parallel $((`nproc`)) -- -w dupbuild=warn

- name: Run Tests
run: ./test.sh
# - name: Run Tests
# run: ./test.sh
2 changes: 1 addition & 1 deletion .github/workflows/macos-build-arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: arch -arm64 brew install cmake ninja

- name: Setup sccache
uses: hendrikmuhs/[email protected].13
uses: hendrikmuhs/[email protected].14
with:
variant: sccache
key: macos-12-${{ inputs.cachePrefix }}-${{ inputs.cmakePreset }}-${{ github.sha }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/macos-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
run: brew install cmake nasm ninja

- name: Setup sccache
uses: hendrikmuhs/[email protected].13
uses: hendrikmuhs/[email protected].14
with:
variant: sccache
key: macos-12-${{ inputs.cachePrefix }}-${{ inputs.cmakePreset }}-${{ github.sha }}
Expand All @@ -47,8 +47,8 @@ jobs:
- name: Build Project
run: cmake --build build --parallel $((`sysctl -n hw.logicalcpu`))

- name: Run Tests
run: ./test.sh
# - name: Run Tests
# run: ./test.sh

- name: Prepare artifacts
if: ${{ inputs.uploadArtifacts }}
Expand Down
95 changes: 65 additions & 30 deletions .github/workflows/release-pipeline.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,48 @@
name: 🏭 Release Pipeline
name: 🏭 Draft Release

on:
push:
tags:
- v*
workflow_dispatch:
inputs:
bump:
description: 'Semver Bump Type'
required: true
default: 'patch'
type: choice
options:
- patch
- minor
- major

permissions:
contents: write

jobs:
cut-release:
name: Cut Release
runs-on: ubuntu-latest
outputs:
new_tag: ${{ steps.set_tag.outputs.new_tag }}
steps:
# Docs - https://github.com/mathieudutour/github-tag-action
- name: Bump Version and Push Tag
if: github.repository == 'OpenGOAL-Mods/OG-Mod-Base'
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag_prefix: v
default_bump: ${{ github.event.inputs.bump }}

- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create ${{ steps.tag_version.outputs.new_tag }} --generate-notes --draft --repo ${{ github.repository }}

- name: Output new tag
id: set_tag
run: |
echo "new_tag=${{ steps.tag_version.outputs.new_tag }}" >> $GITHUB_OUTPUT
# Windows
build_windows_clang:
name: "🖥️ Windows"
Expand All @@ -29,26 +63,29 @@ jobs:
uploadArtifacts: true
secrets: inherit

# # macOS
# build_macos_intel:
# name: "🍎 MacOS"
# uses: ./.github/workflows/macos-build.yaml
# with:
# cmakePreset: "Release-macos-clang-static"
# cachePrefix: "static"
# uploadArtifacts: true
# secrets: inherit
# macOS
build_macos_intel:
name: "🍎 MacOS"
uses: ./.github/workflows/macos-build.yaml
with:
cmakePreset: "Release-macos-clang-static"
cachePrefix: "static"
uploadArtifacts: true
secrets: inherit

# Upload the Artifacts
upload_artifacts:
needs:
- cut-release
- build_windows_clang
- build_linux_clang
# - build_macos_intel
- build_macos_intel
name: "Upload Artifacts"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.cut-release.outputs.new_tag }}

- name: Prepare Artifact Folder
run: mkdir -p ./ci-artifacts/final
Expand All @@ -66,7 +103,7 @@ jobs:
mkdir -p ./ci-artifacts/linux
./.github/scripts/releases/extract_build_unix.sh ./ci-artifacts/linux ./ci-artifacts/opengoal-linux-static ./
pushd ci-artifacts/linux
TAG_VAL=$(echo ${{ github.REF }} | awk -F'refs/tags/' '{print $2}')
TAG_VAL=${{ needs.cut-release.outputs.new_tag }}
tar czf ../final/opengoal-linux-${TAG_VAL}.tar.gz .
popd
chmod +x ./ci-artifacts/opengoal-linux-static/lsp/lsp
Expand All @@ -76,31 +113,29 @@ jobs:
run: |
mkdir -p ./ci-artifacts/windows
./.github/scripts/releases/extract_build_windows.sh ./ci-artifacts/windows ./ci-artifacts/opengoal-windows-static ./
TAG_VAL=$(echo ${{ github.REF }} | awk -F'refs/tags/' '{print $2}')
TAG_VAL=${{ needs.cut-release.outputs.new_tag }}
7z a -tzip ./ci-artifacts/final/opengoal-windows-${TAG_VAL}.zip ./ci-artifacts/windows/*
cp ./ci-artifacts/opengoal-windows-static/lsp.exe ./ci-artifacts/final/opengoal-lsp-windows-${TAG_VAL}.exe
# - name: Prepare macOS Build Assets
# run: |
# mkdir -p ./ci-artifacts/macos
# ./.github/scripts/releases/extract_build_unix.sh ./ci-artifacts/macos ./ci-artifacts/opengoal-macos-static ./
# pushd ci-artifacts/macos
# TAG_VAL=$(echo ${{ github.REF }} | awk -F'refs/tags/' '{print $2}')
# tar czf ../final/opengoal-macos-intel-${TAG_VAL}.tar.gz .
# popd
# chmod +x ./ci-artifacts/opengoal-macos-static/lsp/lsp
# cp ./ci-artifacts/opengoal-macos-static/lsp/lsp ./ci-artifacts/final/opengoal-lsp-macos-intel-${TAG_VAL}.bin
- name: Prepare macOS Build Assets
run: |
mkdir -p ./ci-artifacts/macos
./.github/scripts/releases/extract_build_unix.sh ./ci-artifacts/macos ./ci-artifacts/opengoal-macos-static ./
pushd ci-artifacts/macos
TAG_VAL=${{ needs.cut-release.outputs.new_tag }}
tar czf ../final/opengoal-macos-intel-${TAG_VAL}.tar.gz .
popd
chmod +x ./ci-artifacts/opengoal-macos-static/lsp/lsp
cp ./ci-artifacts/opengoal-macos-static/lsp/lsp ./ci-artifacts/final/opengoal-lsp-macos-intel-${TAG_VAL}.bin
- name: Upload Assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG_VAL=$(echo ${{ github.REF }} | awk -F'refs/tags/' '{print $2}')
gh release upload "${TAG_VAL}" ${{ github.WORKSPACE }}/ci-artifacts/final/* --repo ${{ github.repository }} --clobber
gh release upload ${{ needs.cut-release.outputs.new_tag }} ${{ github.WORKSPACE }}/ci-artifacts/final/* --repo ${{ github.repository }} --clobber
- name: Publish Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG_VAL=$(echo ${{ github.REF }} | awk -F'refs/tags/' '{print $2}')
gh release edit ${TAG_VAL} --draft=false --repo ${{ github.repository }}
gh release edit ${{ needs.cut-release.outputs.new_tag }} --draft=false --repo ${{ github.repository }}
2 changes: 1 addition & 1 deletion .github/workflows/windows-build-clang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
}
- name: Setup sccache
uses: hendrikmuhs/[email protected].13
uses: hendrikmuhs/[email protected].14
with:
variant: sccache
key: windows-2022-${{ inputs.cachePrefix }}-${{ inputs.cmakePreset }}-${{ github.sha }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/windows-build-msvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
}
- name: Setup sccache
uses: hendrikmuhs/[email protected].13
uses: hendrikmuhs/[email protected].14
with:
variant: sccache
key: windows-2022-${{ inputs.cachePrefix }}-${{ inputs.cmakePreset }}-${{ github.sha }}
Expand All @@ -56,10 +56,10 @@ jobs:
set CL=/MP
cmake --build build --parallel %NUMBER_OF_PROCESSORS%
- name: Run Tests
timeout-minutes: 10
env:
GTEST_OUTPUT: "xml:opengoal-test-report.xml"
run: |
./build/bin/goalc-test.exe --gtest_color=yes --gtest_brief=0 --gtest_filter="-*MANUAL_TEST*"
# - name: Run Tests
# timeout-minutes: 10
# env:
# GTEST_OUTPUT: "xml:opengoal-test-report.xml"
# run: |
# ./build/bin/goalc-test.exe --gtest_color=yes --gtest_brief=0 --gtest_filter="-*MANUAL_TEST*"

Loading

0 comments on commit bad4524

Please sign in to comment.