Skip to content

Commit

Permalink
fix: fix linux ci
Browse files Browse the repository at this point in the history
Signed-off-by: Cocoa <i@uwucocoa.moe>
  • Loading branch information
cocoa-xu committed Feb 10, 2025
1 parent 70224cb commit e9bfab7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/linux-precompile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:

jobs:
precompile:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
TFLITE_BEAM_PREFER_PRECOMPILED: "false"
ARMV6_TOOLCHAIN_NAME: "nerves_toolchain_armv6_nerves_linux_gnueabihf-linux_x86_64"
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
- name: Install system dependecies
run: |
sudo apt-get update
sudo apt-get install -y build-essential automake autoconf pkg-config bc m4 unzip zip curl git libssl-dev gzip libncurses5-dev ca-certificates
sudo apt-get install -y build-essential automake autoconf pkg-config bc m4 unzip zip curl git libssl-dev gzip libncurses5-dev ca-certificates flatbuffers-compile
if [ "${{ matrix.pair.arch_name }}" = "aarch64" ]; then
sudo sed -i 's/focal/jammy/g' /etc/apt/sources.list
sudo apt-get update
Expand All @@ -120,12 +120,6 @@ jobs:
sudo apt-get install -y ${{ matrix.pair.c_compiler }} ${{ matrix.pair.cpp_compiler }}
fi
git clone https://github.com/google/flatbuffers.git
cd flatbuffers/
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
make
sudo make install
- name: Create precompiled library
run: |
export NIF_VERSION="$(erl -noshell -eval "io:format('~ts', [erlang:system_info(nif_version)])." -s erlang halt)"
Expand Down
10 changes: 5 additions & 5 deletions cc_toolchain/armv6-nerves-linux-gnueabihf.cmake
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#
# CMake Toolchain file for cross-compiling for armv6 on Linux (with nerves toolchain).
#
# curl -fSL https://github.com/nerves-project/toolchains/releases/download/v13.2.0/nerves_toolchain_armv6_nerves_linux_gnueabihf-linux_x86_64-13.2.0-363664F.tar.xz -o nerves_toolchain_armv6_nerves_linux_gnueabihf-linux_x86_64-13.2.0-363664F.tar.xz
# tar -xf nerves_toolchain_armv6_nerves_linux_gnueabihf-linux_x86_64-13.2.0-363664F.tar.xz
# sudo mv nerves_toolchain_armv6_nerves_linux_gnueabihf-linux_x86_64-13.2.0 /usr/local/bin/nerves_toolchain_armv6_nerves_linux_gnueabihf-linux_x86_64-13.2.0
# curl -fSL https://github.com/nerves-project/toolchains/releases/download/v14.2.0/nerves_toolchain_armv6_nerves_linux_gnueabihf-linux_x86_64-14.2.0-11156D8.tar.xz -o nerves_toolchain_armv6_nerves_linux_gnueabihf-linux_x86_64-14.2.0-11156D8.tar.xz
# tar -xf nerves_toolchain_armv6_nerves_linux_gnueabihf-linux_x86_64-14.2.0-11156D8.tar.xz
# sudo mv nerves_toolchain_armv6_nerves_linux_gnueabihf-linux_x86_64-14.2.0 /usr/local/bin/nerves_toolchain_armv6_nerves_linux_gnueabihf-linux_x86_64-14.2.0
#
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR armv6)

set(CMAKE_C_COMPILER "/usr/local/bin/nerves_toolchain_armv6_nerves_linux_gnueabihf-linux_x86_64-13.2.0/bin/armv6-nerves-linux-gnueabihf-gcc")
set(CMAKE_CXX_COMPILER "/usr/local/bin/nerves_toolchain_armv6_nerves_linux_gnueabihf-linux_x86_64-13.2.0/bin/armv6-nerves-linux-gnueabihf-g++")
set(CMAKE_C_COMPILER "/usr/local/bin/nerves_toolchain_armv6_nerves_linux_gnueabihf-linux_x86_64-14.2.0/bin/armv6-nerves-linux-gnueabihf-gcc")
set(CMAKE_CXX_COMPILER "/usr/local/bin/nerves_toolchain_armv6_nerves_linux_gnueabihf-linux_x86_64-14.2.0/bin/armv6-nerves-linux-gnueabihf-g++")

set(CMAKE_FIND_ROOT_PATH /usr/arm-linux-gnueabihf)

Expand Down
10 changes: 5 additions & 5 deletions cc_toolchain/riscv64-nerves-linux-gnu.cmake
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#
# CMake Toolchain file for cross-compiling for riscv64 on Linux (with nerves toolchain).
#
# curl -fSL https://github.com/nerves-project/toolchains/releases/download/v13.2.0/nerves_toolchain_riscv64_nerves_linux_gnu-linux_x86_64-13.2.0-DB80D1B.tar.xz -o nerves_toolchain_riscv64_nerves_linux_gnu-linux_x86_64-13.2.0-DB80D1B.tar.xz
# tar -xf nerves_toolchain_riscv64_nerves_linux_gnu-linux_x86_64-13.2.0-DB80D1B.tar.xz
# sudo mv nerves_toolchain_riscv64_nerves_linux_gnu-linux_x86_64-13.2.0 /usr/local/bin/nerves_toolchain_riscv64_nerves_linux_gnu-linux_x86_64-13.2.0
# curl -fSL https://github.com/nerves-project/toolchains/releases/download/v14.2.0/nerves_toolchain_riscv64_nerves_linux_gnu-linux_x86_64-14.2.0-D43CCBE.tar.xz -o nerves_toolchain_riscv64_nerves_linux_gnu-linux_x86_64-14.2.0-D43CCBE.tar.xz
# tar -xf nerves_toolchain_riscv64_nerves_linux_gnu-linux_x86_64-14.2.0-D43CCBE.tar.xz
# sudo mv nerves_toolchain_riscv64_nerves_linux_gnu-linux_x86_64-14.2.0 /usr/local/bin/nerves_toolchain_riscv64_nerves_linux_gnu-linux_x86_64-14.2.0
#
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR riscv64)

set(CMAKE_C_COMPILER "/usr/local/bin/nerves_toolchain_riscv64_nerves_linux_gnu-linux_x86_64-13.2.0/bin/riscv64-nerves-linux-gnu-gcc")
set(CMAKE_CXX_COMPILER "/usr/local/bin/nerves_toolchain_riscv64_nerves_linux_gnu-linux_x86_64-13.2.0/bin/riscv64-nerves-linux-gnu-g++")
set(CMAKE_C_COMPILER "/usr/local/bin/nerves_toolchain_riscv64_nerves_linux_gnu-linux_x86_64-14.2.0/bin/riscv64-nerves-linux-gnu-gcc")
set(CMAKE_CXX_COMPILER "/usr/local/bin/nerves_toolchain_riscv64_nerves_linux_gnu-linux_x86_64-14.2.0/bin/riscv64-nerves-linux-gnu-g++")

set(CMAKE_FIND_ROOT_PATH /usr/riscv64-linux-gnu)

Expand Down

0 comments on commit e9bfab7

Please sign in to comment.