Skip to content

feat: open sourcing autopack!! #1

feat: open sourcing autopack!!

feat: open sourcing autopack!! #1

Workflow file for this run

name: "CI"
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
ci:
strategy:
fail-fast: false
matrix:
rust_version: [stable]
platform:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
runs-on: ${{ matrix.platform.os }}
steps:
- uses: actions/checkout@v2
- name: Install Rust Stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.platform.target }}
override: true
- name: Get current date
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Cache cargo registry
uses: actions/cache@v2.1.4
with:
path: ~/.cargo/registry
# Add date to the cache to keep it up to date
key: ${{ matrix.platform.os }}-stable-cargo-registry-${{ hashFiles('Cargo.toml') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.platform.os }}-stable-cargo-registry-${{ hashFiles('Cargo.toml') }}
${{ matrix.platform.os }}-stable-cargo-registry-
- name: Cache cargo index
uses: actions/cache@v2.1.4
with:
path: ~/.cargo/git
# Add date to the cache to keep it up to date
key: ${{ matrix.platform.os }}-stable-cargo-index-${{ hashFiles('Cargo.toml') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.platform.os }}-stable-cargo-index-${{ hashFiles('Cargo.toml') }}
${{ matrix.platform.os }}-stable-cargo-index-
- name: Cache cargo target
uses: actions/cache@v2
with:
path: target
# Add date to the cache to keep it up to date
key: ${{ matrix.platform.os }}-stable-cargo-core-${{ hashFiles('Cargo.toml') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.platform.os }}-stable-cargo-core-${{ hashFiles('Cargo.toml') }}
${{ matrix.platform.os }}-stable-cargo-core-
- uses: actions-rs/cargo@v1
with:
command: build
args: --target=${{ matrix.platform.target }}
- name: Test autopack
run: |
cargo test -r --no-fail-fast --target ${{ matrix.platform.target }}