From 23a5cb5355efc4ddb4eeb2851e35180d96f1d877 Mon Sep 17 00:00:00 2001 From: Rinne Date: Sun, 31 Mar 2024 21:10:36 +0800 Subject: [PATCH] disable build ci. --- .github/workflows/main.yml | 100 ++++++++++++++++++++----------------- 1 file changed, 53 insertions(+), 47 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6c167dd4..189fdcde 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -# name: CI +name: CI # on: # push: # branches: [master] @@ -8,49 +8,55 @@ # group: ${{ github.workflow }}-${{ github.ref }} # cancel-in-progress: true -# jobs: -# build: -# name: Test -# runs-on: ${{ matrix.os }} -# strategy: -# max-parallel: 2 -# fail-fast: false -# matrix: -# build: [linux-release, windows-release, osx-release] -# include: -# - build: linux-release -# os: ubuntu-latest -# config: release -# - build: osx-release -# os: macos-latest -# config: release -# - build: windows-release -# os: windows-2019 -# config: release -# steps: -# - uses: actions/checkout@v4 -# - uses: actions/setup-dotnet@v4 -# with: -# dotnet-version: | -# 7.0.x -# 8.0.x -# - name: Cache Packages -# uses: actions/cache@v4 -# with: -# key: "unit_test_models" -# path: LLama.Unittest/Models -# # workaround for actions/setup-dotnet#155 -# - name: Clear package cache -# run: dotnet clean LLamaSharp.sln && dotnet nuget locals all --clear -# - name: Restore packages -# run: dotnet restore LLamaSharp.sln -# - name: Build -# run: dotnet build LLamaSharp.sln -c ${{ matrix.config }} --no-restore -# - name: Test -# run: dotnet test LLamaSharp.sln -c ${{ matrix.config }} -l "console;verbosity=detailed" --diag:logs/log.txt -# - name: Upload artifacts -# if: always() -# uses: actions/upload-artifact@v3 -# with: -# path: logs/ -# name: logs +on: + workflow_run: + workflows: ["release-minor-trigger"] + types: + - completed + +jobs: + build: + name: Test + runs-on: ${{ matrix.os }} + strategy: + max-parallel: 2 + fail-fast: false + matrix: + build: [linux-release, windows-release, osx-release] + include: + - build: linux-release + os: ubuntu-latest + config: release + - build: osx-release + os: macos-latest + config: release + - build: windows-release + os: windows-2019 + config: release + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: | + 7.0.x + 8.0.x + - name: Cache Packages + uses: actions/cache@v4 + with: + key: "unit_test_models" + path: LLama.Unittest/Models + # workaround for actions/setup-dotnet#155 + - name: Clear package cache + run: dotnet clean LLamaSharp.sln && dotnet nuget locals all --clear + - name: Restore packages + run: dotnet restore LLamaSharp.sln + - name: Build + run: dotnet build LLamaSharp.sln -c ${{ matrix.config }} --no-restore + - name: Test + run: dotnet test LLamaSharp.sln -c ${{ matrix.config }} -l "console;verbosity=detailed" --diag:logs/log.txt + - name: Upload artifacts + if: always() + uses: actions/upload-artifact@v3 + with: + path: logs/ + name: logs