chore: Switch to Gitea Actions.
This commit is contained in:
parent
3d422dc9e4
commit
6cf5d92cb8
47
.drone.yml
47
.drone.yml
|
@ -1,47 +0,0 @@
|
|||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
environment:
|
||||
DEPENDENCIES: cmake pkg-config libx11-dev libasound2-dev libudev-dev libxcb-xfixes0-dev libwayland-dev libxkbcommon-dev libvulkan-dev libpulse-dev
|
||||
|
||||
steps:
|
||||
- name: test
|
||||
image: rust:bullseye
|
||||
pull: always
|
||||
commands:
|
||||
- apt-get update -qq
|
||||
- apt-get install -qqy $DEPENDENCIES
|
||||
- rustup component add clippy rustfmt
|
||||
- cargo fmt --check
|
||||
- cargo test
|
||||
- cargo clippy
|
||||
- name: release
|
||||
image: rust:bullseye
|
||||
pull: always
|
||||
commands:
|
||||
- apt-get update -qq
|
||||
- apt-get install -qqy $DEPENDENCIES
|
||||
- cargo publish
|
||||
when:
|
||||
ref:
|
||||
- refs/tags/v*
|
||||
environment:
|
||||
CARGO_REGISTRY_TOKEN:
|
||||
from_secret: cargo_registry_token
|
||||
- name: discord notification
|
||||
image: appleboy/drone-discord
|
||||
when:
|
||||
status: [success, failure]
|
||||
settings:
|
||||
webhook_id:
|
||||
from_secret: discord_webhook_id
|
||||
webhook_token:
|
||||
from_secret: discord_webhook_token
|
||||
tts: true
|
||||
message: >
|
||||
{{#success build.status}}
|
||||
{{repo.name}} build {{build.number}} succeeded: <{{build.link}}>
|
||||
{{else}}
|
||||
{{repo.name}} build {{build.number}} failed: <{{build.link}}>
|
||||
{{/success}}
|
39
.gitea/workflows/release.yml
Normal file
39
.gitea/workflows/release.yml
Normal file
|
@ -0,0 +1,39 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v[0-9]+.[0-9]+.[0-9]+*"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pre-commit
|
||||
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
||||
- 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') }}
|
||||
- uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
components: rustfmt, clippy
|
||||
- name: install Linux build dependencies
|
||||
run: sudo apt-get update; sudo apt-get install -y --no-install-recommends libasound2-dev libudev-dev libwayland-dev libclang-dev cmake
|
||||
if: runner.os == 'linux'
|
||||
- uses: actions/setup-python@v3
|
||||
- uses: pre-commit/action@v3.0.1
|
||||
- ame: Publish
|
||||
run: cargo publish
|
||||
env:
|
||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
37
.gitea/workflows/test.yml
Normal file
37
.gitea/workflows/test.yml
Normal file
|
@ -0,0 +1,37 @@
|
|||
name: Test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
strategy:
|
||||
matrix:
|
||||
# os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
os: [ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pre-commit
|
||||
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
||||
- 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') }}
|
||||
- uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
components: rustfmt, clippy
|
||||
- name: install Linux build dependencies
|
||||
run: sudo apt-get update; sudo apt-get install -y --no-install-recommends libasound2-dev libudev-dev libwayland-dev libclang-dev cmake
|
||||
if: runner.os == 'linux'
|
||||
- uses: actions/setup-python@v3
|
||||
- uses: pre-commit/action@v3.0.1
|
Loading…
Reference in New Issue
Block a user