Skip to content

Commit

Permalink
Merge pull request #213 from ramsayleung/auth-rewrite-part1
Browse files Browse the repository at this point in the history
  • Loading branch information
ramsayleung authored Jul 8, 2021
2 parents 26527e5 + bf8124b commit 0fee50a
Show file tree
Hide file tree
Showing 52 changed files with 4,141 additions and 4,218 deletions.
76 changes: 22 additions & 54 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,53 +27,43 @@ jobs:
command: fmt
args: --all -- --check

# Cross compilation is only needed for the main client and not the entire
# workspace.
cross-compile:
name: Cross Compile
docs:
name: Check Docs
runs-on: ubuntu-latest
env:
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
strategy:
matrix:
target:
- aarch64-unknown-linux-gnu
- arm-unknown-linux-gnueabihf
- armv7-unknown-linux-gnueabihf
client:
- client-ureq,ureq-rustls-tls
- client-reqwest,reqwest-rustls-tls
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install gcc for armhf
run: sudo apt-get update && sudo apt-get install gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
target: ${{ matrix.target }}

- name: Run cargo build
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --target ${{ matrix.target }} --no-default-features --features=cli,env-file,${{ matrix.client }}
- name: Install cargo-deadlinks
run: cargo install cargo-deadlinks

- name: Build and Check
run: RUSTDOCFLAGS='-D warnings' cargo doc --features=cli,env-file

test-client:
- name: Look for Dead Links
run: |
cd target
for crate in doc/rspotify*; do
echo ">> Checking in $crate"
cargo deadlinks --check-http --dir "$crate"
done
continue-on-error: true

test:
name: Test and Lint for each Client
runs-on: ubuntu-latest
strategy:
matrix:
client:
- client-ureq,ureq-rustls-tls
- client-reqwest,reqwest-rustls-tls
features:
- rspotify/cli,rspotify/env-file,rspotify/client-ureq,rspotify/ureq-rustls-tls,rspotify-http/client-ureq,rspotify-http/ureq-rustls-tls
- rspotify/cli,rspotify/env-file,rspotify/client-reqwest,rspotify/reqwest-rustls-tls,rspotify-http/client-reqwest,rspotify-http/reqwest-rustls-tls
steps:
- name: Checkout sources
uses: actions/checkout@v2
Expand All @@ -90,32 +80,10 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace --no-default-features --features=cli,env-file,${{ matrix.client }} -- -D warnings

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features --features=env-file,${{ matrix.client }}

# The rest of the crates don't need to be tested with multiple feature
# combinations.
test-crates:
name: Simple Tests for Crates
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
args: -p rspotify -p rspotify-http -p rspotify-model -p rspotify-macros --no-default-features --features=${{ matrix.features }} -- -D warnings

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: -p rspotify-macros -p rspotify-model
args: -p rspotify -p rspotify-http -p rspotify-model -p rspotify-macros --no-default-features --features=${{ matrix.features }}
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 0fee50a

Please sign in to comment.