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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/cache@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
|
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
|
||||||
target/
|
target/
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-cargo-
|
${{ runner.os }}-cargo-
|
||||||
|
- name: Setup Rust
|
||||||
|
uses: actions/setup-rust@v1
|
||||||
|
with:
|
||||||
|
rust-version: '1.70'
|
||||||
|
targets: 'wasm32-unknown-unknown'
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --features full
|
run: cargo build --all-features
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: cargo test --features full
|
run: cargo test --all-features
|
||||||
|
|
||||||
- name: Run clippy
|
|
||||||
run: cargo clippy --features full -- -D warnings
|
|
||||||
|
|
||||||
- name: Check formatting
|
- name: Check formatting
|
||||||
run: cargo fmt --check
|
run: cargo fmt --check
|
||||||
|
- name: Run clippy
|
||||||
release:
|
run: cargo clippy --all-features -- -D warnings
|
||||||
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 }}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user