Skip to content

[DNM]

[DNM] #364

Workflow file for this run

name: CI
on:
push:
branches: [ trunk ]
pull_request:
branches: [ trunk ]
env:
BUNDLE_PATH: /tmp/.bundle
GEM_HOME: /tmp/.bundle
GEM_PATH: /tmp/.bundle
TERM: xterm256
jobs:
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
override: true
profile: minimal
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.63.0
components: clippy
override: true
profile: minimal
- run: cargo clippy --all --all-features -- -D warnings
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: |
sudo apt-get install -y shellcheck
./script/lints/lint_fixtures.sh
./script/lints/lint_scripts.sh
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: native
- os: ubuntu-20.04
target: native
- os: macos-latest
target: native
- os: ubuntu-20.04
target: aarch64-unknown-linux-gnu
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.63.0
override: true
profile: minimal
target: aarch64-unknown-linux-gnu
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-${{ matrix.target }}-cargo-2-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/cache@v2
with:
path: |
librubyfmt/ruby_checkout
key: ${{ runner.os }}-${{ matrix.target }}-ruby-v1-${{ hashFiles('.git/modules/librubyfmt/ruby_checkout/HEAD') }}
- if: runner.os == 'macOS'
run: |
brew install automake bison
echo "/usr/local/opt/bison/bin:$PATH" >> $GITHUB_PATH
- run: ./script/test.sh
env:
TARGET: ${{ matrix.target }}
- uses: actions/upload-artifact@v3
with:
name: rubyfmt-artifact-${{ matrix.os }}-${{ matrix.target }}
path: target/${{ matrix.target == 'native' && 'release' || format('{0}/release', matrix.target) }}/rubyfmt-main