Skip to content

Commit

Permalink
cbindgenのインストール時にcargo-quickinstallのリポジトリを明示的に指定する (VOICEVOX#293)
Browse files Browse the repository at this point in the history
* Explicitly specify cargo-quickinstall releases for cbindgen

* Fix the version of cbindgen
  • Loading branch information
qryxip authored Sep 29, 2022
1 parent a5e7db0 commit e2fe26a
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
24 changes: 24 additions & 0 deletions .github/actions/cargo-binstall-cbindgen/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
inputs:
version:
required: true
default: ^0.24

runs:
using: composite
steps:
- name: Install cbindgen
shell: bash
run: |
case "$OS" in
Windows)
cargo install cbindgen --version ${{ inputs.version }};;
macOS | Linux )
cargo binstall \
cbindgen@${{ inputs.version }} \
--pkg-url 'https://github.com/alsuren/cargo-quickinstall/releases/download/{ name }-{ version }-{ target }/{ name }-{ version }-{ target }.tar.gz' \
--pkg-fmt tgz \
--bin-dir '{ bin }{ binary-ext }' \
--no-confirm \
--log-level debug;;
esac
2 changes: 1 addition & 1 deletion .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
- name: Install cargo-binstall
uses: taiki-e/install-action@cargo-binstall
- name: Install cbindgen
run: cargo binstall cbindgen@^0.24 --no-confirm
uses: ./.github/actions/cargo-binstall-cbindgen
- name: set cargo version
if: ${{ env.VERSION != 'DEBUG' }}
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate_document.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install cargo-binstall
uses: taiki-e/install-action@cargo-binstall
- name: Install cbindgen
run: cargo binstall cbindgen@^0.24 --no-confirm
uses: ./.github/actions/cargo-binstall-cbindgen
- name: Generate C header file
run: cbindgen --crate voicevox_core_c_api -o ./docs/apis/c_api/doxygen/voicevox_core.h
- name: mkdir public
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Install cargo-binstall
uses: taiki-e/install-action@cargo-binstall
- name: Install cbindgen
run: cargo binstall cbindgen@^0.24 --no-confirm
uses: ./.github/actions/cargo-binstall-cbindgen
- name: Generate voicevox_core_1.h
run: cbindgen --crate voicevox_core_c_api -o ./voicevox_core_1.h
- name: Generate voicevox_core_2.h
Expand All @@ -91,7 +91,7 @@ jobs:
- name: Install cargo-binstall
uses: taiki-e/install-action@cargo-binstall
- name: Install cbindgen
run: cargo binstall cbindgen@^0.24 --no-confirm
uses: ./.github/actions/cargo-binstall-cbindgen
- name: build voicevox_core_c_api
run: cargo build -p voicevox_core_c_api
- name: voicevox_core.hを生成
Expand Down

0 comments on commit e2fe26a

Please sign in to comment.