Skip to content

Commit

Permalink
Update to the latest livesplit-core
Browse files Browse the repository at this point in the history
This also does some smaller fixes such as building directly on ARM based
macOS.
  • Loading branch information
CryZe committed Mar 14, 2024
1 parent d92dd75 commit 914eb70
Show file tree
Hide file tree
Showing 5 changed files with 474 additions and 402 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/before_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ main() {
local src=$(pwd) \
stage=

if [ "$OS_NAME" = "macOS-latest" ]; then
if [[ "$OS_NAME" =~ ^macos\-.*$ ]]; then
stage=$(mktemp -d -t tmp)
else
stage=$(mktemp -d)
Expand All @@ -14,7 +14,7 @@ main() {
if [ "$OS_NAME" = "ubuntu-latest" ]; then
mkdir -p $stage/obs-livesplit-one/bin/$PLUGIN_BITS
cp target/$TARGET/max-opt/libobs_livesplit_one.so $stage/obs-livesplit-one/bin/$PLUGIN_BITS/libobs-livesplit-one.so
elif [ "$OS_NAME" = "macOS-latest" ]; then
elif [[ "$OS_NAME" =~ ^macos\-.*$ ]]; then
mkdir -p $stage/obs-livesplit-one.plugin/Contents/MacOS
mkdir -p $stage/obs-livesplit-one.plugin/Contents/Resources
cp target/$TARGET/max-opt/libobs_livesplit_one.dylib $stage/obs-livesplit-one.plugin/Contents/MacOS/obs-livesplit-one.so
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ main() {

$cargo build --target $TARGET $release_flag $FEATURE_FLAGS

if [ "$OS_NAME" = "macOS-latest" ]; then
if [[ "$OS_NAME" =~ ^macos\-.*$ ]]; then
install_name_tool -change $(pwd)/target/$TARGET/$target_folder/deps/libobs.dylib @rpath/libobs.0.dylib target/$TARGET/$target_folder/libobs_livesplit_one.dylib
fi
}
Expand Down
30 changes: 11 additions & 19 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,48 +99,40 @@ jobs:
- label: macOS aarch64
target: aarch64-apple-darwin
rust_flags: -L framework=/Applications/OBS.app/Contents/Frameworks
os: macOS-latest
arm: yes
os: macos-14
features: auto-splitting
cross: skip
install_target: true

- label: macOS x86_64
target: x86_64-apple-darwin
rust_flags: -L framework=/Applications/OBS.app/Contents/Frameworks
os: macOS-latest
arm: no
os: macos-13
features: auto-splitting
cross: skip

- label: macOS x86_64-v3
target: x86_64-apple-darwin
target_rename: x86_64_v3-apple-darwin
rust_flags: -C target-cpu=x86-64-v3 -L framework=/Applications/OBS.app/Contents/Frameworks
os: macOS-latest
arm: no
os: macos-13
features: auto-splitting
cross: skip

steps:
- name: Checkout Commit
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Rust
uses: hecrj/setup-rust-action@v1
uses: hecrj/setup-rust-action@v2
with:
rust-version: ${{ matrix.toolchain || 'stable' }}

- name: Install Target
if: matrix.install_target != ''
run: rustup target add ${{ matrix.target }}

- name: Install arm64 OBS
if: matrix.os == 'macOS-latest' && matrix.arm == 'yes'
run: curl https://cdn-fastly.obsproject.com/downloads/obs-studio-29.1.3-macos-arm64.dmg -o obs.dmg && hdiutil attach obs.dmg && sudo cp -R /Volumes/obs-studio-29.1.3-macos-arm64/OBS.app /Applications && hdiutil unmount /Volumes/obs-studio-29.1.3-macos-arm64

- name: Install x64 OBS
if: matrix.os == 'macOS-latest' && matrix.arm == 'no'
- name: Install OBS (macOS)
if: startsWith(matrix.os, 'macos-')
run: brew install --cask obs

- name: Download cross
Expand Down Expand Up @@ -190,10 +182,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Commit
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Rust
uses: hecrj/setup-rust-action@v1
uses: hecrj/setup-rust-action@v2
with:
components: clippy

Expand All @@ -204,10 +196,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Commit
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Rust
uses: hecrj/setup-rust-action@v1
uses: hecrj/setup-rust-action@v2
with:
components: rustfmt

Expand Down
Loading

0 comments on commit 914eb70

Please sign in to comment.