Skip to content

ci: Homebrew tap 更新の App トークンを client-id へ移行 #157

ci: Homebrew tap 更新の App トークンを client-id へ移行

ci: Homebrew tap 更新の App トークンを client-id へ移行 #157

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo registry
uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Run tests
run: cargo test --verbose
- name: Run clippy
run: cargo clippy -- -D warnings
- name: Check formatting
run: cargo fmt -- --check
build:
name: Build
needs: test
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
cross: false
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
cross: true
- os: macos-latest
target: x86_64-apple-darwin
cross: false
- os: macos-latest
target: aarch64-apple-darwin
cross: false
- os: windows-latest
target: x86_64-pc-windows-msvc
cross: false
steps:
- uses: actions/checkout@v5
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install cross-compilation tools
if: matrix.cross
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
- name: Build with cross
if: matrix.cross
run: |
cargo install cross --git https://github.com/cross-rs/cross
cross build --release --target ${{ matrix.target }}
- name: Build
if: "!matrix.cross"
run: cargo build --release --target ${{ matrix.target }}