Skip to content

Commit

Permalink
Merge pull request #3 from EnderdracheLP/dev/1.37
Browse files Browse the repository at this point in the history
Update to Beat Saber 1.37
  • Loading branch information
michael-r-elp authored Jul 28, 2024
2 parents 43a762a + 96277b0 commit 51a28e1
Show file tree
Hide file tree
Showing 66 changed files with 2,189 additions and 3,562 deletions.
78 changes: 30 additions & 48 deletions .github/workflows/BuildQSounds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,48 +21,31 @@ on:

env:
module_id: QuestSounds
version: 1.4.1-Dev.${{ github.run_number }}
BSVersion: 1.28.0_4124311467
# ndkname: android-ndk-r24
#version: 1.4.1-Dev.${{ github.run_number }}

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
name: Checkout
with:
submodules: true
lfs: true

- uses: seanmiddleditch/gha-setup-ninja@v3

# - name: Install Powershell
# run: sudo apt-get install -y powershell

# - name: Cache Android NDK
# id: cache-ndk
# uses: actions/cache@v2
# env:
# cache-name: cache-ndk
# with:
# path: ndk
# key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.ndkname }}
# restore-keys: |
# ${{ runner.os }}-${{ env.cache-name }}-${{ env.ndkname }}

# - name: Install Android NDK
# if: steps.cache-ndk.outputs.cache-hit != 'true'
# run: |
# wget -q -O ndk.zip https://dl.google.com/android/repository/${ndkname}-linux-x86_64.zip
# unzip -q ndk.zip
# mv ${ndkname} ndk

# - name: Create ndkpath.txt
# run: |
# cd ndk
# pwd > ${GITHUB_WORKSPACE}/ndkpath.txt
- name: Get Version
shell: pwsh
run: |
$branchParts = '${{ github.ref_name }}'.Split('/'); $branchMain = $branchParts[0]; if ($branchParts[0] -match "^\d+$") { $branchMain = 'pr'; $branchSub = "$($branchParts[0])." } elseif ($branchParts.Length -eq 2) { $branchSub = "$($branchParts[1].Replace('.', '-'))." }; echo "version=$((Get-Content ./qpm.shared.json -Raw | ConvertFrom-Json).config.info.version.Split('-')[0])-$($branchMain).${{ github.run_number }}+$($branchSub)ra${{ github.run_attempt }}.$($env:GITHUB_SHA.Substring(0, 7))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
# Not sure this is used in this workflow
- name: Get BSVersion
shell: pwsh
run: |
echo "BSVersion=$((Get-Content ./mod.template.json -Raw | ConvertFrom-Json).packageVersion)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- uses: seanmiddleditch/gha-setup-ninja@v5

- name: Create ndkpath.txt
run: |
Expand All @@ -74,30 +57,31 @@ jobs:
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: cargo-build.yml
name: linux-qpm-rust
name: linux-qpm
path: QPM
repo: RedBrumbler/QuestPackageManager-Rust
repo: QuestPackageManager/QPM.CLI

- name: QPM Collapse
run: |
chmod +x ./QPM/qpm-rust
./QPM/qpm-rust collapse
chmod +x ./QPM/qpm
./QPM/qpm collapse
- name: QPM Dependencies Cache
id: cache-qpm-deps
uses: actions/cache@v2
env:
cache-name: cache-qpm-deps
with:
path: /home/runner/.local/share/QPM-Rust/cache
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('qpm.json', '.github/BuildQSounds.yml') }}
path: /home/runner/.local/share/QPM-RS/cache
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('qpm.shared.json') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
${{ runner.os }}-${{ env.cache-name }}
- name: QPM Restore
- name: QPM Set Version & Restore
run: |
./QPM/qpm-rust restore
./QPM/qpm package edit --version ${{ env.version }}
./QPM/qpm restore
- name: Check dependency Folders
run: |
Expand All @@ -107,15 +91,13 @@ jobs:
echo "Checking libs"
ls -lh ${GITHUB_WORKSPACE}/extern/libs
echo ""
echo "Checking QPM-Rust/cache Folder"
ls -lh $HOME/.local/share/QPM-Rust/cache
echo "Checking QPM/cache Folder"
ls -lh $HOME/.local/share/QPM-RS/cache
echo ""
- name: Build
run: |
cd ${GITHUB_WORKSPACE}
./QPM/qpm-rust package edit --version ${{ env.version }}
./QPM/qpm-rust qmod build
pwsh -Command ./build.ps1 -actions
- name: Get Library Name
Expand All @@ -124,32 +106,32 @@ jobs:
cd ./build/
pattern="lib${module_id}*.so"
files=( $pattern )
echo ::set-output name=NAME::"${files[0]}"
echo "NAME=${files[0]}" >> $GITHUB_OUTPUT
- name: Package QMOD
run: |
cd ${GITHUB_WORKSPACE}
pwsh -Command ./buildQMOD.ps1 -package
./QPM/qpm qmod zip -i ./build/ -i ./extern/libs/ -f ./Cover.jpg -i ./Examples/ ${module_id}_${version}.qmod
- name: Upload non-debug artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ steps.libname.outputs.NAME }}
path: ./build/${{ steps.libname.outputs.NAME }}
if-no-files-found: error


- name: Upload debug artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: debug_${{ steps.libname.outputs.NAME }}
path: ./build/debug/${{ steps.libname.outputs.NAME }}
if-no-files-found: error


- name: Upload QMOD
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ env.module_id }}-(UNZIP-for-QMOD).qmod
path: ./${{ env.module_id }}_${{ env.version }}.qmod
Expand Down
101 changes: 28 additions & 73 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,85 +9,64 @@ on:

env:
module_id: QuestSounds
BSVersion: 1.28.0_4124311467
ndkname: android-ndk-r24

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
name: Checkout
with:
submodules: true
lfs: true

- uses: seanmiddleditch/gha-setup-ninja@v3

#- name: Install Powershell
# run: sudo apt-get install -y powershell
- uses: seanmiddleditch/gha-setup-ninja@v5

- name: Get the tag name
run: echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV

#- name: Cache Android NDK
# id: cache-ndk
# uses: actions/cache@v2
# env:
# cache-name: cache-ndk
# with:
# path: ndk
# key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.ndkname }}
# restore-keys: |
# ${{ runner.os }}-${{ env.cache-name }}-${{ env.ndkname }}

#- name: Install Android NDK
# if: steps.cache-ndk.outputs.cache-hit != 'true'
# run: |
# wget -q -O ndk.zip https://dl.google.com/android/repository/${ndkname}-linux-x86_64.zip
# unzip -q ndk.zip
# mv ${ndkname} ndk

#- name: Create ndkpath.txt
# run: |
# cd ndk
# pwd > ${GITHUB_WORKSPACE}/ndkpath.txt
- name: Get BSVersion
shell: pwsh
run: |
echo "BSVersion=$((Get-Content ./mod.template.json -Raw | ConvertFrom-Json).packageVersion)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Create ndkpath.txt
run: |
echo "$ANDROID_NDK_LATEST_HOME" > ${GITHUB_WORKSPACE}/ndkpath.txt
- name: Get QPM
if: steps.cache-qpm.outputs.cache-hit != 'true'
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: cargo-build.yml
name: linux-qpm-rust
path: QPM
repo: RedBrumbler/QuestPackageManager-Rust

- name: Get QPM
if: steps.cache-qpm.outputs.cache-hit != 'true'
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: cargo-build.yml
name: linux-qpm
path: QPM
repo: QuestPackageManager/QPM.CLI
- name: QPM Collapse
run: |
chmod +x ./QPM/qpm-rust
./QPM/qpm-rust collapse
chmod +x ./QPM/qpm
./QPM/qpm collapse
- name: QPM Dependencies Cache
id: cache-qpm-deps
uses: actions/cache@v2
env:
cache-name: cache-qpm-deps
with:
path: /home/runner/.local/share/QPM-Rust/cache
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('qpm.json', '.github/BuildQSounds.yml') }}
path: /home/runner/.local/share/QPM-RS/cache
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('qpm.shared.json') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
${{ runner.os }}-${{ env.cache-name }}
- name: QPM Restore
- name: QPM Set Version & Restore
run: |
./QPM/qpm-rust restore
./QPM/qpm package edit --version ${{ env.version }}
./QPM/qpm restore
- name: Check dependency Folders
run: |
Expand All @@ -98,14 +77,12 @@ jobs:
ls -lh ${GITHUB_WORKSPACE}/extern/libs
echo ""
echo "Checking QPM-Rust/cache Folder"
ls -lh $HOME/.local/share/QPM-Rust/cache
ls -lh $HOME/.local/share/QPM-RS/cache
echo ""
- name: Build
run: |
cd ${GITHUB_WORKSPACE}
./QPM/qpm-rust package edit --version ${{ env.version }}
./QPM/qpm-rust qmod build
pwsh -Command ./build.ps1 -actions
- name: Get Library Name
Expand All @@ -114,40 +91,18 @@ jobs:
cd ./build/
pattern="lib${module_id}*.so"
files=( $pattern )
echo ::set-output name=NAME::"${files[0]}"
echo "NAME=${files[0]}" >> $GITHUB_OUTPUT
- name: Package QMOD
run: |
cd ${GITHUB_WORKSPACE}
pwsh -Command ./buildQMOD.ps1 -package -release
./QPM/qpm qmod zip -i ./build/ -i ./extern/libs/ -f ./Cover.jpg -i ./Examples/ ${module_id}_${version}.qmod
- name: Release
uses: softprops/action-gh-release@v1
with:
name: ${{ env.module_id }} ${{ env.version }} for Beat Saber ${{ env.BSVersion }}
files: |
./${{ env.module_id }}.qmod
./${{ env.module_id }}_${{ env.version }}.qmod
body_path: ./rl-notes.md
draft: true

#- name: Create Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: ${{ env.module_id }} ${{ github.ref }} for Beat Saber ${{ env.BSVersion }}
# body_path: ./rl-notes.md
# draft: true
# prerelease: false
#- name: Upload QMOD Release Asset
# id: upload-release-QMOD
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ./${{ env.module_id }}.qmod
# asset_name: ${{ env.module_id }}.qmod
# asset_content_type: application/qmod
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ ndkpath.txt

# Other files
extern/

qpm.shared.json
extern/
*.backup

*.log
Expand Down
Loading

0 comments on commit 51a28e1

Please sign in to comment.