Skip to content

Commit

Permalink
Merge branch 'main' into onnxruntime-rs-to-ort
Browse files Browse the repository at this point in the history
  • Loading branch information
qryxip committed Mar 30, 2024
2 parents 6b1af81 + fa630ce commit f1503ac
Show file tree
Hide file tree
Showing 41 changed files with 1,630 additions and 1,183 deletions.
44 changes: 17 additions & 27 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ jobs:
- name: Raplace resource
if: inputs.is_production
shell: bash
run: |
run:
mv -f download/resource/core/README.md ./README.md
- name: Install cargo-binstall
uses: taiki-e/install-action@cargo-binstall
Expand Down Expand Up @@ -298,7 +298,7 @@ jobs:
cp -v target/${{ matrix.target }}/release/libvoicevox_core_java_api.so java_artifact/ || true
- name: Code signing (Windows)
if: startsWith(matrix.os, 'windows') && inputs.code_signing
run: |
run:
bash build_util/codesign.bash "artifact/${{ env.ASSET_NAME }}/voicevox_core.dll"
env:
ESIGNERCKA_USERNAME: ${{ secrets.ESIGNERCKA_USERNAME }}
Expand Down Expand Up @@ -344,44 +344,34 @@ jobs:
needs: [config, build_and_deploy]
runs-on: macos-12
env:
IOS_X86_64_PATH: artifact/voicevox_core-x86_64-apple-ios
IOS_AARCH64_SIM_PATH: artifact/voicevox_core-aarch64-apple-ios-sim
IOS_AARCH64_PATH: artifact/voicevox_core-aarch64-apple-ios
ASSET_NAME: voicevox_core-ios-xcframework-cpu-${{ needs.config.outputs.version }}
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v2
with:
name: voicevox_core-x86_64-apple-ios
path: artifact/voicevox_core-x86_64-apple-ios
path: ${{ env.IOS_X86_64_PATH }}
- uses: actions/download-artifact@v2
with:
name: voicevox_core-aarch64-apple-ios-sim
path: artifact/voicevox_core-aarch64-apple-ios-sim
path: ${{ env.IOS_AARCH64_SIM_PATH }}
- uses: actions/download-artifact@v2
with:
name: voicevox_core-aarch64-apple-ios
path: artifact/voicevox_core-aarch64-apple-ios
- name: Create fat binary
path: ${{ env.IOS_AARCH64_PATH }}
- name: Create xcframework
id: create-xcframework
run: |
mkdir -p "artifact/voicevox_core-sim"
lipo -create "artifact/voicevox_core-x86_64-apple-ios/libvoicevox_core.dylib" "artifact/voicevox_core-aarch64-apple-ios-sim/libvoicevox_core.dylib" -output "artifact/voicevox_core-sim/libvoicevox_core.dylib"
- name: Create XCFramework
run: |
mkdir -p "artifact/${{ env.ASSET_NAME }}"
# 必要なファイルだけコピー
mkdir -p "Headers-sim"
cp -v artifact/voicevox_core-x86_64-apple-ios/voicevox_core.h "Headers-sim"
cp -v crates/voicevox_core_c_api/xcframework/Headers/module.modulemap "Headers-sim"
mkdir -p "Headers-aarch64"
cp -v artifact/voicevox_core-aarch64-apple-ios/voicevox_core.h "Headers-aarch64"
cp -v crates/voicevox_core_c_api/xcframework/Headers/module.modulemap "Headers-aarch64"
xcodebuild -create-xcframework \
-library "artifact/voicevox_core-sim/libvoicevox_core.dylib" \
-headers "Headers-sim" \
-library "artifact/voicevox_core-aarch64-apple-ios/libvoicevox_core.dylib" \
-headers "Headers-aarch64" \
-output "artifact/${{ env.ASSET_NAME }}/voicevox_core.xcframework"
build_util/make_ios_xcframework.bash
echo "output_asset_path=${OUTPUT_ASSET_PATH}" >> "$GITHUB_OUTPUT"
env:
OUTPUT_ASSET_PATH: artifact/voicevox_core-ios-xcframework-cpu
- name: Archive artifact
run: |
cd artifact/${{ env.ASSET_NAME }}
cd ${{ steps.create-xcframework.outputs.output_asset_path }}
7z a "../../${{ env.ASSET_NAME }}.zip" "voicevox_core.xcframework"
- name: Upload to Release
if: fromJson(needs.config.outputs.deploy)
Expand Down Expand Up @@ -410,7 +400,7 @@ jobs:
- name: Raplace resource
if: inputs.is_production
shell: bash
run: |
run:
rm -r ./model; mv download/fat_resource/core/model ./model
- name: Create artifact
run: |
Expand Down Expand Up @@ -452,7 +442,7 @@ jobs:
- name: Install cargo-edit
run: cargo binstall cargo-edit@^0.11 --no-confirm
- name: set cargo version
run: |
run:
cargo set-version "$VERSION" -p voicevox_core_java_api

- name: "Download artifact (android-arm64-cpu)"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cargo-deny.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Install cargo-binstall
uses: taiki-e/install-action@cargo-binstall
- name: Install cargo-deny
run: cargo binstall cargo-deny@^0.13 --no-confirm --log-level debug
run: cargo binstall cargo-deny@^0.14 --no-confirm --log-level debug
- name: cargo-deny
run: |
if ${{ !!github.event.release }}; then
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ jobs:
metadata=$(cargo metadata --format-version 1)
version=$(
jq -r '
(.workspace_members[] | select(startswith("xtask "))) as $xtask
.workspace_members as $workspace_members
| (.packages[] | select(.name == "xtask").id | select(. as $id | $workspace_members | index($id))) as $xtask
| (.resolve.nodes[] | select(.id == $xtask).deps[] | select(.name == "cbindgen").pkg) as $cbindgen
| .packages[] | select(.id == $cbindgen).version
' <<< "$metadata"
Expand Down
Loading

0 comments on commit f1503ac

Please sign in to comment.