Skip to content

Add demo gif

Add demo gif #35

Workflow file for this run

name: Xcode - Build and Analyze
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
name: Build and analyse default scheme using xcodebuild command
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: target
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.OS }}-build-
- name: Install latest rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: beta
target: x86_64-apple-darwin
default: true
override: true
- name: Install dylibbundler
run: |
brew install dylibbundler
- name: Build for mac
run: ./build_macos_lib.sh
- name: Set Default Scheme
working-directory: ./macos
run: |
scheme_list=$(xcodebuild -list -json | tr -d "\n")
default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]")
echo $default | cat >default
echo Using default scheme: $default
- name: Build
working-directory: ./macos
env:
scheme: ${{ 'default' }}
run: |
if [ $scheme = default ]; then scheme=$(cat default); fi
if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi
file_to_build=`echo $file_to_build | awk '{$1=$1;print}'`
xcodebuild ARCHS=x86_64 ONLY_ACTIVE_ARCH=NO clean build analyze archive -scheme "$scheme" -"$filetype_parameter" "$file_to_build" | xcpretty && exit ${PIPESTATUS[0]}
- name: Get App
working-directory: ./macos
run: |
xcodebuild ARCHS=x86_64 ONLY_ACTIVE_ARCH=NO archive -archivePath archive.xcarchive -scheme Cappy3ds
xcodebuild -archivePath ./archive.xcarchive -exportArchive -exportPath ./ -exportOptionsPlist ./exportOptionsAdHoc.plist
dylibBundler -b -cd -d ./Cappy3ds.app/Contents/Frameworks -p @executable_path/../Frameworks/ -x ./Cappy3ds.app/Contents/Frameworks/libcappy3ds_render.dylib
install_name_tool -change /Users/runner/work/Cappy3ds/Cappy3ds/target/debug/deps/libcappy3ds_render.dylib @executable_path/../Frameworks/libcappy3ds_render.dylib ./Cappy3ds.app/Contents/MacOS/Cappy3ds
zip -r -X ../result.zip Cappy3ds.app
- uses: actions/upload-artifact@v3
with:
name: macOS
path: result.zip