取消安装工具链,改为镜像
This commit is contained in:
		@@ -10,37 +10,32 @@ on:
 | 
				
			|||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  test-and-build:
 | 
					  test-and-build:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    container:
 | 
				
			||||||
 | 
					      image: ghcr.io/rust-lang/rust:latest
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      # 1. 检出代码 - 使用 Gitea 本地的 actions 镜像
 | 
					      # 1. 检出代码 - 使用 Gitea 本地的 actions 镜像
 | 
				
			||||||
      - name: 🔍 Check out repository code
 | 
					      - name: 🔍 Check out repository code
 | 
				
			||||||
        uses: https://devstar.cn/actions/checkout@v4 
 | 
					        uses: https://devstar.cn/actions/checkout@v4 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # 2. 安装 Rust 工具链
 | 
					      # 2. 显示环境信息
 | 
				
			||||||
      - name: 🦀 Set up Rust
 | 
					 | 
				
			||||||
        run: |
 | 
					 | 
				
			||||||
          curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
 | 
					 | 
				
			||||||
          echo "$HOME/.cargo/bin" >> $GITHUB_PATH
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      # 3. 显示环境信息
 | 
					 | 
				
			||||||
      - name: ℹ️ Environment Info
 | 
					      - name: ℹ️ Environment Info
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          rustc --version
 | 
					          rustc --version
 | 
				
			||||||
          cargo --version
 | 
					          cargo --version
 | 
				
			||||||
          echo "Building repository: ${{ gitea.repository }}"
 | 
					          echo "Building repository: ${{ gitea.repository }}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # 4. 构建项目(调试模式)
 | 
					      # 3. 构建项目(调试模式)
 | 
				
			||||||
      - name: 🔧 Build (Debug)
 | 
					      - name: 🔧 Build (Debug)
 | 
				
			||||||
        run: cargo build --verbose
 | 
					        run: cargo build --verbose
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # 5. 构建项目(发布模式)
 | 
					      # 4. 构建项目(发布模式)
 | 
				
			||||||
      - name: 🚀 Build (Release)
 | 
					      - name: 🚀 Build (Release)
 | 
				
			||||||
        run: cargo build --release --verbose
 | 
					        run: cargo build --release --verbose
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # 6. 运行测试
 | 
					      # 5. 运行测试
 | 
				
			||||||
      - name: ✅ Run Tests
 | 
					      - name: ✅ Run Tests
 | 
				
			||||||
        run: cargo test --verbose
 | 
					        run: cargo test --verbose
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      # 6. 清理构建缓存
 | 
				
			||||||
      # 7. 清理构建缓存
 | 
					 | 
				
			||||||
      - name: 🧹 Cleanup
 | 
					      - name: 🧹 Cleanup
 | 
				
			||||||
        run: cargo clean
 | 
					        run: cargo clean
 | 
				
			||||||
		Reference in New Issue
	
	Block a user