From 7869893038a4b5699f180ba6afa84bd1e29cc1f0 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sun, 5 Jul 2020 12:14:37 -0700 Subject: [PATCH] GitHub Actions: run clippy, fmt; remove other CI (#365) Consolidates the multitude of CI systems, replacing Azure, SourceHut, and AppVeyor with GitHub Actions, which now also runs clippy and fmt. See #352 * Add task to run clippy * Add task to check formatting * Test on 1.44.1 toolchain * Update readme: status badge and downloads on GitHub Actions * Remove strip binary task, leave it unstripped to allow debugging for now * Rename task to install dependencies * Remove Azure Pipelines * Remove sr.ht SourceHut CI * Remove AppVeyor --- .build.yml | 20 -------------- .github/workflows/build.yaml | 15 +++++++---- README.md | 7 ++--- appveyor.yml | 51 ------------------------------------ azure-pipelines.yml | 17 ------------ 5 files changed, 14 insertions(+), 96 deletions(-) delete mode 100644 .build.yml delete mode 100644 appveyor.yml delete mode 100644 azure-pipelines.yml diff --git a/.build.yml b/.build.yml deleted file mode 100644 index bc89cb5..0000000 --- a/.build.yml +++ /dev/null @@ -1,20 +0,0 @@ -image: ubuntu/latest -packages: - - curl - - libegl1-mesa-dev - - libgles2-mesa-dev - - pkg-config - - libssl-dev -sources: - - https://github.com/iceiix/stevenarella -tasks: - - setup: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh - sh ./rustup.sh -y - source $HOME/.cargo/env - cargo --version - - build: | - source $HOME/.cargo/env - cd stevenarella - cargo build - cargo test diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e89aeae..6eef1c4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -17,9 +17,10 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: stable + toolchain: 1.44.1 + components: clippy, rustfmt default: true - - name: (Linux) Install libxcb-composite + - name: Install dependencies if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update @@ -29,9 +30,13 @@ jobs: cargo build --verbose --release env: MACOSX_DEPLOYMENT_TARGET: 10.14 - - name: (Linux/MacOS) Strip binary - if: matrix.os != 'windows-latest' - run: strip target/release/stevenarella + - name: Run clippy + uses: actions-rs/clippy-check@v1.0.7 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-targets -- -D warnings + - name: Check formatting + run: cargo fmt --all -- --check - name: Move binary run: | if [[ ${{ matrix.os }} == windows ]]; then diff --git a/README.md b/README.md index 5df806c..82d7d41 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Stevenarella -[![builds.sr.ht status](https://builds.sr.ht/~iceiix/stevenarella.svg)](https://builds.sr.ht/~iceiix/stevenarella?) +[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Ficeiix%2Fstevenarella%2Fbadge%3Fref%3Dmaster&style=plastic)](https://actions-badge.atrox.dev/iceiix/stevenarella/goto?ref=master) Multi-protocol Minecraft-compatible client written in Rust @@ -56,8 +56,9 @@ Support for older protocols will _not_ be dropped as newer protocols are added. ## Downloads -Windows users can download pre-compiled builds from here: https://ci.appveyor.com/project/iceiix/stevenarella -(Select your platform, Click the artifacts tab and download Steven.zip) +Windows, Ubuntu Linux, and macOS users can download pre-compiled builds +from [GitHub Actions](https://actions-badge.atrox.dev/iceiix/stevenarella/goto?ref=master). +(Click the artifacts drop-down and select your platform.) ## Building diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 9a90680..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,51 +0,0 @@ -version: 1.0.{build} -image: Visual Studio 2017 -clone_depth: 1 -skip_branch_with_pr: true -branches: - only: - - master -platform: - - x64 -build_script: -- cmd: >- - echo on - - echo AddMessage "PLATFORM is %PLATFORM%" - - if "%PLATFORM%" == "x86" set RUST_INSTALL=i686-pc-windows-msvc - - if "%PLATFORM%" == "x64" set RUST_INSTALL=x86_64-pc-windows-msvc - - echo AddMessage "platform is %platform%" - - appveyor AddMessage "Platform rust: %RUST_INSTALL%" - - appveyor DownloadFile "https://static.rust-lang.org/dist/rust-1.44.1-%RUST_INSTALL%.exe" -FileName rust-install.exe - - "./rust-install.exe" /VERYSILENT /NORESTART /DIR="C:\Rust\" - - SET PATH=%PATH%;C:\Rust\bin - - rustc -V - - cargo -V - - cargo build - - mkdir dist-debug - - cp target\debug\stevenarella.exe dist-debug - - - - cargo build --release - - mkdir dist - - cp target\release\stevenarella.exe dist - - -artifacts: -- path: dist -- path: dist-debug diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index ead5cb8..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,17 +0,0 @@ -jobs: - - template: default.yml@templates - parameters: - setup: - - script: sudo apt-get install libxcb-composite0-dev libx11-dev - displayName: "Install build dependencies" - condition: eq(variables['Agent.OS'], 'Linux') - minrust: 1.44.1 - clippy: -D clippy::all - -resources: - repositories: - - repository: templates - type: github - name: iceiix/azure-pipelines - ref: c50d2b8335a6b1856aa2fc4f5f41f6684ef8580c - endpoint: iceiix