fix: replace Python CI with correct Rust CI workflow
Some checks failed
CI / test (push) Failing after 4s
Some checks failed
CI / test (push) Failing after 4s
This commit is contained in:
@@ -11,71 +11,26 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Rust
|
||||
run: |
|
||||
rustup install stable
|
||||
rustup default stable
|
||||
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends libssl-dev libssh2-1-dev pkg-config cmake
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v3
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cargo-
|
||||
|
||||
- name: Setup Rust
|
||||
uses: actions/setup-rust@v1
|
||||
with:
|
||||
rust-version: '1.70'
|
||||
targets: 'wasm32-unknown-unknown'
|
||||
- name: Build
|
||||
run: cargo build --features full
|
||||
|
||||
run: cargo build --all-features
|
||||
- name: Run tests
|
||||
run: cargo test --features full
|
||||
|
||||
- name: Run clippy
|
||||
run: cargo clippy --features full -- -D warnings
|
||||
|
||||
run: cargo test --all-features
|
||||
- name: Check formatting
|
||||
run: cargo fmt --check
|
||||
|
||||
release:
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
if: startsWith(gitea.ref, 'refs/tags/v')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Rust
|
||||
run: |
|
||||
rustup install stable
|
||||
rustup default stable
|
||||
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends libssl-dev libssh2-1-dev pkg-config cmake
|
||||
|
||||
- name: Build release
|
||||
run: cargo build --release --features full
|
||||
|
||||
- name: Create Release
|
||||
run: |
|
||||
curl -X POST "${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases" \
|
||||
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"tag_name": "${{ gitea.ref_name }}",
|
||||
"name": "${{ gitea.ref_name }}",
|
||||
"body": "Release ${{ gitea.ref_name }}"
|
||||
}'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
- name: Run clippy
|
||||
run: cargo clippy --all-features -- -D warnings
|
||||
|
||||
Reference in New Issue
Block a user