From 54bd321d0a1b064ebf9b7532e237688b078368a1 Mon Sep 17 00:00:00 2001 From: Philpax Date: Sun, 16 Jul 2023 21:04:57 +0200 Subject: [PATCH] fix(ci): build with 1.65.0 --- .github/workflows/integration_tests.yml | 7 ++- .github/workflows/rust.yml | 72 ++++++++++++++----------- 2 files changed, 47 insertions(+), 32 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 2014f651..1ddada3c 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -25,7 +25,10 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive - - uses: dtolnay/rust-toolchain@stable + - uses: actions-rs/toolchain@v1 + with: + toolchain: 1.65.0 + override: true - name: Install dependencies run: | sudo apt-get update @@ -34,7 +37,7 @@ jobs: pkg-config \ zlib1g-dev - name: Run Integration Tests for ${{ matrix.model }} - run: cargo run --release -p llm-test ${{ matrix.model }} + run: cargo run --release -p llm-test -- ${{ matrix.model }} # Upload test results - uses: actions/upload-artifact@v3 if: always() diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b81f8579..35919948 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -21,7 +21,10 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive - - uses: dtolnay/rust-toolchain@stable + - uses: actions-rs/toolchain@v1 + with: + toolchain: 1.65.0 + override: true - name: Check run: cargo check --verbose - name: Build @@ -35,7 +38,10 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive - - uses: dtolnay/rust-toolchain@stable + - uses: actions-rs/toolchain@v1 + with: + toolchain: 1.65.0 + override: true with: components: rustfmt, clippy - name: Formatting @@ -48,27 +54,30 @@ jobs: run: cargo doc --workspace --exclude llm-cli metal: - name: Build with metal support + name: Build with Metal support runs-on: macos-latest - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - uses: dtolnay/rust-toolchain@stable - - name: Check - run: cargo check --verbose - - name: Build - run: cargo build --verbose --features metal + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - uses: actions-rs/toolchain@v1 + with: + toolchain: 1.65.0 + override: true + - name: Check + run: cargo check --verbose + - name: Build + run: cargo build --verbose --features metal cuda: - name: Build with cuda support + name: Build with CUDA support strategy: - # Don't stop building if it fails on an OS + # Don't stop building if it fails on an OS fail-fast: false matrix: os: [windows-latest, ubuntu-latest] runs-on: ${{ matrix.os }} - steps: + steps: - uses: actions/checkout@v3 with: submodules: recursive @@ -77,8 +86,8 @@ jobs: if: matrix.os == 'ubuntu-latest' id: cuda-toolkit-linux with: - cuda: '12.2.0' - method: 'network' + cuda: "12.2.0" + method: "network" #See e.g. https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ non-cuda-sub-packages: '["libcublas","libcublas-dev"]' sub-packages: '["nvcc","compiler","libraries","libraries-dev","cudart","cudart-dev"]' @@ -88,31 +97,34 @@ jobs: if: matrix.os == 'windows-latest' id: cuda-toolkit-windows with: - cuda: '12.2.0' + cuda: "12.2.0" #See https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html#install-the-cuda-software - method: 'local' - - uses: dtolnay/rust-toolchain@stable + method: "local" + - uses: actions-rs/toolchain@v1 + with: + toolchain: 1.65.0 + override: true - name: Check run: cargo check --verbose - name: Build run: cargo build --verbose --features cublas opencl: - name: Build with opencl support + name: Build with OpenCL support strategy: - # Don't stop building if it fails on an OS + # Don't stop building if it fails on an OS fail-fast: false matrix: os: [windows-latest, ubuntu-latest] runs-on: ${{ matrix.os }} - steps: + steps: - uses: actions/checkout@v3 with: submodules: recursive - + - name: Install CLBlast on linux if: matrix.os == 'ubuntu-latest' - run: sudo apt install libclblast-dev + run: sudo apt install libclblast-dev - name: Install vcpkg on windows if: matrix.os == 'windows-latest' @@ -122,7 +134,7 @@ jobs: ./bootstrap-vcpkg.sh ls -la shell: bash - + - name: Install OpenCL on windows if: matrix.os == 'windows-latest' run: | @@ -144,11 +156,13 @@ jobs: echo "${{ github.workspace }}/vcpkg/packages/opencl_x64-windows/bin" >> $GITHUB_PATH shell: bash - - uses: dtolnay/rust-toolchain@stable + - uses: actions-rs/toolchain@v1 + with: + toolchain: 1.65.0 + override: true - name: Check run: cargo check --verbose - - name: Build with OpenCL on Windows if: matrix.os == 'windows-latest' run: cargo build --verbose --features clblast @@ -158,5 +172,3 @@ jobs: - name: Build with OpenCL on Linux if: matrix.os == 'ubuntu-latest' run: cargo build --verbose --features clblast - -