[rust] fix build on Linux due to difference type of c_char
#805
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
FFMPEG_VERSION_TAG: n4.4.1 | |
FX9_BUILD_DEPENDENCIES_DIRECTORY: ${{ github.workspace }}/out/dependencies | |
GLFW_VERSION_TAG: 3.3.8 | |
ICU_VERSION_TAG: release-71-1 | |
NANOEM_BUILD_DEPENDENCIES_DIRECTORY: ${{ github.workspace }}/out/dependencies | |
NANOEM_BUILD_ARTIFACT_DIRECTORY: ${{ github.workspace }}/out/core | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
# libc++/libc++abi are not prerequsite libraries but specifies to test CXXFLAGS/LDFLAGS are functional | |
env: | |
CC: clang | |
CXX: clang++ | |
CXXFLAGS: -stdlib=libc++ | |
LDFLAGS: -lc++abi | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
# Assumes clang/cmake/libc++/libc++abi are installed on GitHub Actions Runner | |
- name: setup prerequisite packages | |
run: | | |
sudo apt-get update && sudo apt-get install -y \ | |
libasound-dev \ | |
libgtk-3-dev \ | |
libglu1-mesa-dev \ | |
ninja-build \ | |
xorg-dev \ | |
libxi-dev \ | |
libxcursor-dev | |
- name: checkout ffmpeg | |
run: git clone --depth=1 --branch=${{ env.FFMPEG_VERSION_TAG }} https://github.com/ffmpeg/ffmpeg.git dependencies/ffmpeg | |
- name: checkout glfw | |
run: git clone --depth=1 --branch=${{ env.GLFW_VERSION_TAG }} https://github.com/glfw/glfw.git dependencies/glfw | |
- name: checkout ICU | |
run: git clone --depth=1 --branch=${{ env.ICU_VERSION_TAG }} https://github.com/unicode-org/icu.git dependencies/icu | |
- name: build all dependencies of nanoem | |
run: cmake -DCONFIG=release -P ${{ github.workspace }}/scripts/build.cmake | |
env: | |
NANOEM_ENABLE_BUILD_FFMPEG: 1 | |
NANOEM_ENABLE_BUILD_GLFW: 1 | |
NANOEM_ENABLE_BUILD_ICU4C: 1 | |
NANOEM_ENABLE_BUILD_MIMALLOC: 1 | |
NANOEM_TARGET_ARCHITECTURES: x86_64 | |
NANOEM_TARGET_CONFIGURATIONS: "debug;release" | |
NANOEM_TARGET_COMPILER: clang | |
- name: build nanoem itself | |
run: | | |
mkdir -p ${{ env.NANOEM_BUILD_ARTIFACT_DIRECTORY }} | |
cd ${{ env.NANOEM_BUILD_ARTIFACT_DIRECTORY }} | |
cmake \ | |
-DCMAKE_INSTALL_PREFIX=${{ env.NANOEM_BUILD_ARTIFACT_DIRECTORY }}/install-root \ | |
-DFX9_ENABLE_OPTIMIZER=OFF \ | |
-DNANOEM_ENABLE_BULLET=ON \ | |
-DNANOEM_ENABLE_GLFW=ON \ | |
-DNANOEM_ENABLE_ICU=ON \ | |
-DNANOEM_ENABLE_IMGUI_FILE_DIALOG=ON \ | |
-DNANOEM_ENABLE_MIMALLOC=ON \ | |
-DNANOEM_ENABLE_NMD=ON \ | |
-DNANOEM_ENABLE_TBB=OFF \ | |
-DNANOEM_ENABLE_TEST=ON \ | |
-DNANOEM_INSTALL_EFFECT_PLUGIN=ON \ | |
-DNANOEM_INSTALL_FFMPEG_PLUGIN=ON \ | |
-DNANOEM_INSTALL_GIF_PLUGIN=OFF \ | |
-DNANOEM_INSTALL_LSMASH_PLUGIN=ON \ | |
-DNANOEM_TARGET_COMPILER=clang \ | |
-GNinja \ | |
../.. | |
cmake --build . --config release | |
- name: test nanoem's unit tests | |
run: | | |
cd ${{ env.NANOEM_BUILD_ARTIFACT_DIRECTORY }} | |
ctest | |
build-macos: | |
runs-on: macos-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: checkout ffmpeg | |
run: git clone --depth=1 --branch=${{ env.FFMPEG_VERSION_TAG }} https://github.com/ffmpeg/ffmpeg.git dependencies/ffmpeg | |
- name: checkout ICU | |
run: git clone --depth=1 --branch=${{ env.ICU_VERSION_TAG }} https://github.com/unicode-org/icu.git dependencies/icu | |
- name: setup prerequisite packages | |
run: brew install ninja | |
- name: build all dependencies of nanoem | |
run: cmake -DCONFIG=release -P ${{ github.workspace }}/scripts/build.cmake | |
env: | |
NANOEM_TARGET_CONFIGURATIONS: "debug;release" | |
NANOEM_TARGET_COMPILER: clang | |
NANOEM_ENABLE_BUILD_FFMPEG: 1 | |
NANOEM_ENABLE_BUILD_ICU4C: 1 | |
NANOEM_ENABLE_BUILD_MIMALLOC: 1 | |
- name: build nanoem itself | |
run: | | |
mkdir -p ${{ env.NANOEM_BUILD_ARTIFACT_DIRECTORY }} | |
cd ${{ env.NANOEM_BUILD_ARTIFACT_DIRECTORY }} | |
cmake \ | |
-DCMAKE_INSTALL_PREFIX=${{ env.NANOEM_BUILD_ARTIFACT_DIRECTORY }}/install-root \ | |
-DFX9_ENABLE_OPTIMIZER=OFF \ | |
-DNANOEM_ENABLE_BULLET=ON \ | |
-DNANOEM_ENABLE_ICU=ON \ | |
-DNANOEM_ENABLE_MIMALLOC=ON \ | |
-DNANOEM_ENABLE_NMD=ON \ | |
-DNANOEM_ENABLE_TEST=ON \ | |
-DNANOEM_INSTALL_EFFECT_PLUGIN=ON \ | |
-DNANOEM_INSTALL_FFMPEG_PLUGIN=ON \ | |
-DNANOEM_INSTALL_GIF_PLUGIN=OFF \ | |
-DNANOEM_INSTALL_LSMASH_PLUGIN=ON \ | |
-DNANOEM_TARGET_COMPILER=clang \ | |
-GNinja \ | |
../.. | |
cmake --build . --config release | |
- name: test nanoem's unit tests | |
run: | | |
cd ${{ env.NANOEM_BUILD_ARTIFACT_DIRECTORY }} | |
ctest | |
build-windows: | |
runs-on: windows-2022 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: build all dependencies of nanoem | |
run: cmake -DCONFIG=release -P ${{ github.workspace }}/scripts/build.cmake | |
env: | |
NANOEM_TARGET_ARCHITECTURES: x86_64 | |
NANOEM_TARGET_CONFIGURATIONS: "debug;release" | |
NANOEM_TARGET_COMPILER: vs2017 | |
NANOEM_TARGET_TOOLSET: v141 | |
NANOEM_ENABLE_BUILD_MIMALLOC: 1 | |
- name: build nanoem itself | |
run: | | |
mkdir -p ${{ env.NANOEM_BUILD_ARTIFACT_DIRECTORY }} | |
cd ${{ env.NANOEM_BUILD_ARTIFACT_DIRECTORY }} | |
cmake ` | |
-DCMAKE_INSTALL_PREFIX="${{ env.NANOEM_BUILD_ARTIFACT_DIRECTORY }}/install-root" ` | |
-DFX9_ENABLE_OPTIMIZER=OFF ` | |
-DNANOEM_ENABLE_BULLET=ON ` | |
-DNANOEM_ENABLE_MIMALLOC=ON ` | |
-DNANOEM_ENABLE_NMD=ON ` | |
-DNANOEM_ENABLE_TEST=ON ` | |
-DNANOEM_INSTALL_EFFECT_PLUGIN=ON ` | |
-DNANOEM_INSTALL_FFMPEG_PLUGIN=OFF ` | |
-DNANOEM_INSTALL_GIF_PLUGIN=OFF ` | |
-DNANOEM_INSTALL_LSMASH_PLUGIN=ON ` | |
-DNANOEM_TARGET_COMPILER=vs2017 ` | |
-G"Visual Studio 17 2022" ` | |
-Tv141 ` | |
../.. | |
cmake --build . --config release | |
- name: test nanoem's unit tests | |
run: | | |
cd ${{ env.NANOEM_BUILD_ARTIFACT_DIRECTORY }} | |
ctest | |
build-rust: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ${{ github.workspace }}/rust | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: setup prerequisite packages | |
run: | | |
sudo apt-get update && sudo apt-get install -y \ | |
protobuf-compiler | |
- name: setup rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: build plugin_wasm | |
run: ./scripts/build.sh | |
codeql: | |
if: ${{ false }} | |
runs-on: ubuntu-latest | |
env: | |
FX9_BUILD_DEPENDENCIES_DIRECTORY: ${{ github.workspace }}/out/dependencies | |
NANOEM_BUILD_DEPENDENCIES_DIRECTORY: ${{ github.workspace }}/out/dependencies | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: initialize CodeQL | |
uses: github/codeql-action/init@v1 | |
with: | |
languages: cpp | |
config-file: ${{ github.workspace }}/.github/codeql/codeql-config.yml | |
- name: setup prerequisite packages | |
run: | | |
sudo apt-get update && sudo apt-get install -y \ | |
cmake \ | |
libasound-dev \ | |
libicu-dev \ | |
libgtk-3-dev \ | |
libglu1-mesa-dev \ | |
ninja-build \ | |
xorg-dev \ | |
libxi-dev \ | |
libxcursor-dev | |
- name: checkout glfw | |
run: git clone https://github.com/glfw/glfw.git dependencies/glfw | |
- name: build all dependencies of nanoem | |
run: | | |
cd ${{ github.workspace }} | |
cmake -DCONFIG=release -P $PWD/scripts/build.cmake | |
env: | |
NANOEM_TARGET_ARCHITECTURES: x86_64 | |
NANOEM_TARGET_CONFIGURATIONS: "debug;release" | |
NANOEM_TARGET_COMPILER: gcc | |
NANOEM_DISABLE_BUILD_SENTRY_NATIVE: 1 | |
NANOEM_DISABLE_BUILD_SPIRV_TOOLS: 1 | |
- name: autobuild | |
uses: github/codeql-action/autobuild@v1 | |
- name: perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v1 |