From b196fdc65b7d32dff68fdb5c63d13edd44f0cb0e Mon Sep 17 00:00:00 2001 From: Sriram Date: Sat, 31 Oct 2026 22:19:58 +0400 Subject: [PATCH 1/5] ci: refresh hosted runner workflows --- .github/workflows/linux_arm.yml | 21 ++++++++------------- .github/workflows/linux_intel.yml | 11 ++++++----- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/linux_arm.yml b/.github/workflows/linux_arm.yml index 107558c..0ffb59b 100644 --- a/.github/workflows/linux_arm.yml +++ b/.github/workflows/linux_arm.yml @@ -11,16 +11,15 @@ on: jobs: build: name: Linux ARMv7 - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: matrix: clang: [["17.0", "clang_17_0"]] # Update this to the latest Clang version if needed steps: - name: Checkout repository code - uses: actions/checkout@v4 # Updated to the latest version of the checkout action - # LLVM and Clang Installation + uses: actions/checkout@v7 - name: Install LLVM and Clang - uses: KyleMayes/install-llvm-action@v1.1.0 # Check for the latest version available + uses: KyleMayes/install-llvm-action@v2 with: version: ${{ matrix.clang[0] }} directory: ${{ runner.temp }}/llvm-${{ matrix.clang[0] }} @@ -31,15 +30,11 @@ jobs: sudo ldconfig # Install Rust - name: Install Rust - uses: actions-rs/toolchain@v1 # Ensure this is the latest release + uses: dtolnay/rust-toolchain@master with: toolchain: stable - target: armv7-unknown-linux-gnueabihf - override: true - # Build + targets: armv7-unknown-linux-gnueabihf + - name: Install cross + run: cargo install cross --locked --version 0.2.5 - name: Build - uses: actions-rs/cargo@v1.1.0 # Use a specific latest version if available - with: - use-cross: true - command: build - args: --target armv7-unknown-linux-gnueabihf + run: cross build --target armv7-unknown-linux-gnueabihf diff --git a/.github/workflows/linux_intel.yml b/.github/workflows/linux_intel.yml index 63e3747..b9d15e9 100644 --- a/.github/workflows/linux_intel.yml +++ b/.github/workflows/linux_intel.yml @@ -16,15 +16,16 @@ jobs: fail-fast: false matrix: include: - - { rust: stable, os: ubuntu-latest } + - { rust: stable, os: ubuntu-24.04 } steps: - name: Checkout repository code - uses: actions/checkout@v2 + uses: actions/checkout@v7 - name: Install dependencies run: | sudo apt install -y cmake libclang-dev libc++-dev gcc-multilib - - name: buid - uses: actions-rs/cargo@v1 + - name: Install Rust ${{ matrix.rust }} + uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - command: build \ No newline at end of file + - name: buid + run: cargo build From 4720dd60ec3dbaa4e890a6f99ace967b0695137a Mon Sep 17 00:00:00 2001 From: Sriram Date: Sat, 31 Oct 2026 22:27:05 +0400 Subject: [PATCH 2/5] ci: update CMake inside ARM build container --- .github/cross.toml | 3 +++ .github/workflows/linux_arm.yml | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 .github/cross.toml diff --git a/.github/cross.toml b/.github/cross.toml new file mode 100644 index 0000000..4b14746 --- /dev/null +++ b/.github/cross.toml @@ -0,0 +1,3 @@ +[target.armv7-unknown-linux-gnueabihf] +# lightgbm3-sys requires CMake >=3.28 inside the cross container. +pre-build = ["apt-get update && apt-get install --assume-yes --no-install-recommends python3-pip && python3 -m pip install --no-cache-dir cmake==3.31.6"] diff --git a/.github/workflows/linux_arm.yml b/.github/workflows/linux_arm.yml index 0ffb59b..4ba2ad3 100644 --- a/.github/workflows/linux_arm.yml +++ b/.github/workflows/linux_arm.yml @@ -12,6 +12,8 @@ jobs: build: name: Linux ARMv7 runs-on: ubuntu-24.04 + env: + CROSS_CONFIG: .github/cross.toml strategy: matrix: clang: [["17.0", "clang_17_0"]] # Update this to the latest Clang version if needed From 386d158cf79ef8ab30983ce79cde56e012ee0ee8 Mon Sep 17 00:00:00 2001 From: Sriram Date: Sat, 31 Oct 2026 22:31:45 +0400 Subject: [PATCH 3/5] ci: use verified CMake binary in legacy container --- .github/cross.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/cross.toml b/.github/cross.toml index 4b14746..80c1156 100644 --- a/.github/cross.toml +++ b/.github/cross.toml @@ -1,3 +1,4 @@ [target.armv7-unknown-linux-gnueabihf] # lightgbm3-sys requires CMake >=3.28 inside the cross container. -pre-build = ["apt-get update && apt-get install --assume-yes --no-install-recommends python3-pip && python3 -m pip install --no-cache-dir cmake==3.31.6"] +# SHA256 from Kitware/CMake v3.31.6 release checksums. +pre-build = ["apt-get update && apt-get install --assume-yes --no-install-recommends ca-certificates curl && curl --fail --location --retry 3 https://github.com/Kitware/CMake/releases/download/v3.31.6/cmake-3.31.6-linux-x86_64.tar.gz --output /tmp/cmake.tar.gz && echo 5a1133ff103c71eb5120e2cc3de922733e7d8a26a98ae716397e8676adb367bf /tmp/cmake.tar.gz | sha256sum --check - && tar -xzf /tmp/cmake.tar.gz --strip-components=1 -C /usr/local && rm /tmp/cmake.tar.gz"] From d79f092b3f47842242cb73953329c04b158b5c9e Mon Sep 17 00:00:00 2001 From: Sriram Date: Sat, 31 Oct 2026 22:50:33 +0400 Subject: [PATCH 4/5] ci: use a current pinned ARM build image --- .github/cross.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/cross.toml b/.github/cross.toml index 80c1156..5d91228 100644 --- a/.github/cross.toml +++ b/.github/cross.toml @@ -1,4 +1,4 @@ [target.armv7-unknown-linux-gnueabihf] -# lightgbm3-sys requires CMake >=3.28 inside the cross container. -# SHA256 from Kitware/CMake v3.31.6 release checksums. -pre-build = ["apt-get update && apt-get install --assume-yes --no-install-recommends ca-certificates curl && curl --fail --location --retry 3 https://github.com/Kitware/CMake/releases/download/v3.31.6/cmake-3.31.6-linux-x86_64.tar.gz --output /tmp/cmake.tar.gz && echo 5a1133ff103c71eb5120e2cc3de922733e7d8a26a98ae716397e8676adb367bf /tmp/cmake.tar.gz | sha256sum --check - && tar -xzf /tmp/cmake.tar.gz --strip-components=1 -C /usr/local && rm /tmp/cmake.tar.gz"] +# Ubuntu 24.04 toolchain supports LightGBM current C++ and CMake requirements. +# Pinned official cross-rs main image for reproducible CI builds. +image = "ghcr.io/cross-rs/armv7-unknown-linux-gnueabihf@sha256:7c3c5764f6daad4871955a5cfda700a9371b90aac02dd9a6f39a6d12c5576c21" From e407d93b72987f5a57de763777bdaa32c5846b2c Mon Sep 17 00:00:00 2001 From: Sriram Date: Sat, 31 Oct 2026 22:59:14 +0400 Subject: [PATCH 5/5] ci: install current CMake in pinned ARM image --- .github/cross.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/cross.toml b/.github/cross.toml index 5d91228..fe14528 100644 --- a/.github/cross.toml +++ b/.github/cross.toml @@ -2,3 +2,6 @@ # Ubuntu 24.04 toolchain supports LightGBM current C++ and CMake requirements. # Pinned official cross-rs main image for reproducible CI builds. image = "ghcr.io/cross-rs/armv7-unknown-linux-gnueabihf@sha256:7c3c5764f6daad4871955a5cfda700a9371b90aac02dd9a6f39a6d12c5576c21" + +# Verify and install the CMake version required by LightGBM. +pre-build = ["apt-get update && apt-get install --assume-yes --no-install-recommends ca-certificates curl && curl --fail --location --retry 3 https://github.com/Kitware/CMake/releases/download/v3.31.6/cmake-3.31.6-linux-x86_64.tar.gz --output /tmp/cmake.tar.gz && echo 5a1133ff103c71eb5120e2cc3de922733e7d8a26a98ae716397e8676adb367bf /tmp/cmake.tar.gz | sha256sum --check - && tar -xzf /tmp/cmake.tar.gz --strip-components=1 -C /usr/local && rm /tmp/cmake.tar.gz"]