Skip to content

Made plugins init for pool instead of each player #222

Made plugins init for pool instead of each player

Made plugins init for pool instead of each player #222

Workflow file for this run

name: ci
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
release:
types:
- created
env:
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: 0
CARGO_HUSKY_DONT_INSTALL_HOOKS: true
COMPLETION_DIR: "target/tmp/bottom/completion/"
MANPAGE_DIR: "target/tmp/bottom/manpage/"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'ClementTsang/bottom' }}
jobs:
pre-job:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- name: Check if this action should be skipped
id: skip_check
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf # v5.3.1
with:
skip_after_successful_duplicate: "true"
paths: '[".cargo/**", ".github/workflows/ci.yml", "sample_configs/**", "src/**", "tests/**", "build.rs", "Cargo.lock", "Cargo.toml", "clippy.toml", "rustfmt.toml", "Cross.toml"]'
do_not_skip: '["workflow_dispatch", "push"]'
other-check:
needs: pre-job
runs-on: ${{ matrix.info.os }}
if: ${{ needs.pre-job.outputs.should_skip != 'true' }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
info:
- { os: "ubuntu-latest", target: "x86_64-unknown-linux-gnu", cross: false, rust: "beta" }
- { os: "macos-12", target: "x86_64-apple-darwin", cross: false, rust: "beta" }
- { os: "windows-2019", target: "x86_64-pc-windows-msvc", cross: false, rust: "beta" }
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
with:
submodules: 'true'
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17
with:
toolchain: ${{ matrix.info.rust || 'stable' }}
target: ${{ matrix.info.target }}
- name: Enable Rust cache
uses: Swatinem/rust-cache@9bdad043e88c75890e36ad3bbc8d27f0090dd609 # 2.7.3
if: ${{ github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork }}
with:
key: ${{ matrix.info.target }}
cache-all-crates: true
- name: Try building with only default features enabled
uses: ClementTsang/cargo-action@v0.0.5
if: ${{ matrix.info.no-default-features != true }}
with:
command: build
args: --all-targets --verbose --target=${{ matrix.info.target }} --locked
use-cross: ${{ matrix.info.cross }}
cross-version: ${{ matrix.info.cross-version || '0.2.5' }}
- name: Try building with no features enabled
uses: ClementTsang/cargo-action@v0.0.5
if: ${{ matrix.info.no-default-features == true }}
with:
command: build
args: --all-targets --verbose --target=${{ matrix.info.target }} --locked --no-default-features
use-cross: ${{ matrix.info.cross }}
cross-version: ${{ matrix.info.cross-version || '0.2.5' }}
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.info.target }}-release
path: target/${{ matrix.info.target }}/release/
# release:
# needs: pre-job
# if: ${{ needs.pre-job.outputs.should_skip != 'true' }}
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4.1.1
# with:
# submodules: 'true'
#
# - name: Set up Rust toolchain
# uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17
# with:
# toolchain: stable
# components: rustfmt, clippy
# target: x86_64-unknown-linux-gnu
#
# - name: Build release
# uses: ClementTsang/cargo-action@v0.0.5
# with:
# command: build
# args: --release --target=x86_64-unknown-linux-gnu
# env:
# RUST_BACKTRACE: full
#
# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
# with:
# tag_name: ${{ github.event.release.tag_name }} # This should be a proper tag like 'v1.0.0'
# release_name: Release ${{ github.event.release.tag_name }}
# body: Release description
# draft: false
# prerelease: false
# env:
# GITHUB_TOKEN: ${{ secrets.TOKEN }}
#
# - name: Upload Release Asset
# uses: actions/upload-release-asset@v1
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: target/x86_64-unknown-linux-gnu/release/your-binary
# asset_name: your-binary
# asset_content_type: application/octet-stream