From 2cd1e0d633864cc506de733268a2fbf85bb78e16 Mon Sep 17 00:00:00 2001 From: Luni-4 Date: Thu, 3 Oct 2019 13:01:35 +0200 Subject: [PATCH] Add Github Actions --- .circleci/config.yml | 39 --------------- .github/workflows/cpal.yml | 99 ++++++++++++++++++++++++++++++++++++++ README.md | 3 +- appveyor.yml | 25 ---------- 4 files changed, 101 insertions(+), 65 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/cpal.yml delete mode 100644 appveyor.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 0730662..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,39 +0,0 @@ -version: 2 - -jobs: - asmjs-test: - working_directory: ~/cpal - docker: - - image: tomaka/rustc-emscripten - steps: - - run: apt-get -qq update && apt-get install -y git - - checkout - - restore_cache: - key: asmjs-test-cache-{{ checksum "Cargo.toml" }} - - run: cargo build --example beep --target asmjs-unknown-emscripten - - save_cache: - key: asmjs-test-cache-{{ checksum "Cargo.toml" }} - paths: - - target - - wasm-test: - working_directory: ~/cpal - docker: - - image: tomaka/rustc-emscripten - steps: - - run: apt-get -qq update && apt-get install -y git - - checkout - - restore_cache: - key: wasm-test-cache-{{ checksum "Cargo.toml" }} - - run: cargo build --example beep --target wasm32-unknown-emscripten - - save_cache: - key: wasm-test-cache-{{ checksum "Cargo.toml" }} - paths: - - target - -workflows: - version: 2 - build-test-and-deploy: - jobs: - - asmjs-test - - wasm-test diff --git a/.github/workflows/cpal.yml b/.github/workflows/cpal.yml new file mode 100644 index 0000000..41dd9bd --- /dev/null +++ b/.github/workflows/cpal.yml @@ -0,0 +1,99 @@ +name: cpal + +on: [push, pull_request] + +jobs: + clippy-test: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Install alsa + run: sudo apt-get install libasound2-dev + - name: Install clippy + run: rustup component add clippy + - name: Run clippy + uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all --all-features + + ubuntu-test: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Install alsa + run: sudo apt-get install libasound2-dev + - name: Install stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - name: Run without features + uses: actions-rs/cargo@v1 + with: + command: test + args: --all --no-default-features --verbose + - name: Run all features + uses: actions-rs/cargo@v1 + with: + command: test + args: --all --all-features --verbose + + asmjs-wasm32-test: + + strategy: + matrix: + target: [asmjs-unknown-emscripten, wasm32-unknown-emscripten] + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Install emscripten + run: sudo apt-get install emscripten + - name: Install stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: ${{ matrix.target }} + - name: Build beep example + run: cargo build --example beep --target ${{ matrix.target }} + + windows-test: + + strategy: + matrix: + version: [x86_64, i686] + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v1 + - name: Install ASIO SDK + env: + LINK: https://www.steinberg.net/asiosdk + shell: powershell + run: | + curl.exe -L -o asio.zip $env:LINK + 7z.exe x -oasio asio.zip + move asio\*\* asio\ + - name: Install ASIO4ALL + run: choco install asio4all + - name: Install llvm and clang + run: choco install llvm + - name: Install stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: ${{ matrix.version }}-pc-windows-msvc + override: true + - name: Run without features + run: cargo test --all --no-default-features --verbose + - name: Run all features + run: | + set CPAL_ASIO_DIR=%GITHUB_WORKSPACE%\asio + cargo test --all --all-features --verbose diff --git a/README.md b/README.md index 6b40973..d3edff5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # CPAL - Cross-Platform Audio Library -[![Build Status](https://travis-ci.org/RustAudio/cpal.svg?branch=master)](https://travis-ci.org/RustAudio/cpal) [![Crates.io](https://img.shields.io/crates/v/cpal.svg)](https://crates.io/crates/cpal) [![docs.rs](https://docs.rs/cpal/badge.svg)](https://docs.rs/cpal/) +[![Actions Status](https://github.com/RustAudio/cpal/workflows/cpal/badge.svg)](https://github.com/RustAudio/cpal/actions) + [![Crates.io](https://img.shields.io/crates/v/cpal.svg)](https://crates.io/crates/cpal) [![docs.rs](https://docs.rs/cpal/badge.svg)](https://docs.rs/cpal/) Low-level library for audio input and output in pure Rust. diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index f77a534..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,25 +0,0 @@ -os: Visual Studio 2015 - -environment: - matrix: - # MSVC - - channel: stable - target: x86_64-pc-windows-msvc - - channel: nightly - target: x86_64-pc-windows-msvc - -matrix: - allow_failures: - - channel: nightly - -install: - - appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe - - rustup-init -yv --default-toolchain %channel% --default-host %target% - - set PATH=%PATH%;%USERPROFILE%\.cargo\bin - - rustc -vV - - cargo -vV - -build: false - -test_script: -- cargo test --verbose %cargoflags%