🚀 publish #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
env: | |
REQWEST_TEST_BODY_FULL: 1 | |
RUST_BACKTRACE: 1 | |
API_ID: 123456789 | |
API_HASH: abcdef0123456789abcdef0123456789 | |
jobs: | |
ci-pass: | |
name: CI is green | |
runs-on: ubuntu-latest | |
needs: | |
- style | |
- test | |
steps: | |
- run: exit 0 | |
style: | |
name: Check Style | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Install rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
components: rustfmt | |
profile: minimal | |
override: true | |
- name: cargo fmt -- --check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: -- --check | |
- name: temporary workaround - fmt all files under src | |
run: cargo fmt -- --check $(find . -name '*.rs' -print) | |
test: | |
name: Test build | |
needs: [ style ] | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- os: macos-latest | |
toolchain: nightly-x86_64-apple-darwin | |
target: x86_64-apple-darwin | |
- os: ubuntu-latest | |
toolchain: nightly-x86_64-unknown-linux-gnu | |
target: x86_64-unknown-linux-gnu | |
- os: windows-latest | |
toolchain: nightly-x86_64-pc-windows-msvc | |
target: x86_64-pc-windows-msvc | |
- os: windows-latest | |
toolchain: nightly-x86_64-pc-windows-gnu | |
target: x86_64-pc-windows-gnu | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Install rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.config.toolchain }} | |
target: ${{ matrix.config.target }} | |
profile: minimal | |
override: true | |
- name: Add mingw64 to path for x86_64-gnu | |
if: matrix.config.target == 'x86_64-pc-windows-gnu' | |
shell: bash | |
run: | | |
echo "C:\msys64\mingw64\bin" >> $GITHUB_PATH | |
echo "C:\msys64\usr\bin" >> $GITHUB_PATH | |
- name: Update gcc | |
if: matrix.config.target == 'x86_64-pc-windows-gnu' | |
run: pacman.exe -Sy --noconfirm mingw-w64-x86_64-toolchain | |
- name: Build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --target ${{ matrix.config.target }} --package teleser_template |