chore: release v0.0.3 #16
Workflow file for this run
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: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: full | |
jobs: | |
test: | |
name: Test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
# Always run main branch builds to completion. | |
fail-fast: ${{ github.event_name == 'pull_request' || | |
(github.ref != 'refs/heads/main' && | |
!startsWith(github.ref, 'refs/tags/')) }} | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
steps: | |
- name: Configure git | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.symlinks true | |
git config --global fetch.parallel 32 | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Run sccache-cache | |
if: github.repository == 'YoloDev/rkyv-utils' | |
uses: mozilla-actions/sccache-action@v0.0.4 | |
- name: Configure sccache | |
if: github.repository == 'YoloDev/rkyv-utils' | |
shell: bash | |
run: | | |
if [[ -z "${{ secrets.SCCACHE_ENDPOINT }}" ]]; then | |
echo "SCCACHE_ENDPOINT is not set" | |
else | |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV | |
echo "CARGO_INCREMENTAL=0" >> $GITHUB_ENV | |
echo "SCCACHE_BUCKET=$SCCACHE_BUCKET" >> $GITHUB_ENV | |
echo "SCCACHE_REGION=$SCCACHE_REGION" >> $GITHUB_ENV | |
echo "SCCACHE_ENDPOINT=$SCCACHE_ENDPOINT" >> $GITHUB_ENV | |
echo "AWS_ACCESS_KEY_ID=$SCCACHE_ACCESS_KEY_ID" >> $GITHUB_ENV | |
echo "AWS_SECRET_ACCESS_KEY=$SCCACHE_SECRET_ACCESS_KEY" >> $GITHUB_ENV | |
fi | |
env: | |
SCCACHE_BUCKET: ${{ vars.SCCACHE_BUCKET }} | |
SCCACHE_REGION: ${{ vars.SCCACHE_REGION }} | |
SCCACHE_ENDPOINT: ${{ secrets.SCCACHE_ENDPOINT }} | |
SCCACHE_ACCESS_KEY_ID: ${{ secrets.SCCACHE_ACCESS_KEY_ID }} | |
SCCACHE_SECRET_ACCESS_KEY: ${{ secrets.SCCACHE_SECRET_ACCESS_KEY }} | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
prefix-key: v0 | |
save-if: ${{ github.ref == 'refs/heads/main' }} | |
# cache-provider: buildjet | |
- name: Lint | |
run: cargo clippy --all -- -D warnings | |
- name: Run tests | |
run: cargo test --workspace --all-features | |
miri-test: | |
name: Miri Test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
# Always run main branch builds to completion. | |
fail-fast: ${{ github.event_name == 'pull_request' || | |
(github.ref != 'refs/heads/main' && | |
!startsWith(github.ref, 'refs/tags/')) }} | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
steps: | |
- name: Configure git | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.symlinks true | |
git config --global fetch.parallel 32 | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: miri | |
- name: Run sccache-cache | |
if: github.repository == 'YoloDev/rkyv-utils' | |
uses: mozilla-actions/sccache-action@v0.0.4 | |
- name: Configure sccache | |
if: github.repository == 'YoloDev/rkyv-utils' | |
shell: bash | |
run: | | |
if [[ -z "${{ secrets.SCCACHE_ENDPOINT }}" ]]; then | |
echo "SCCACHE_ENDPOINT is not set" | |
else | |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV | |
echo "CARGO_INCREMENTAL=0" >> $GITHUB_ENV | |
echo "SCCACHE_BUCKET=$SCCACHE_BUCKET" >> $GITHUB_ENV | |
echo "SCCACHE_REGION=$SCCACHE_REGION" >> $GITHUB_ENV | |
echo "SCCACHE_ENDPOINT=$SCCACHE_ENDPOINT" >> $GITHUB_ENV | |
echo "AWS_ACCESS_KEY_ID=$SCCACHE_ACCESS_KEY_ID" >> $GITHUB_ENV | |
echo "AWS_SECRET_ACCESS_KEY=$SCCACHE_SECRET_ACCESS_KEY" >> $GITHUB_ENV | |
fi | |
env: | |
SCCACHE_BUCKET: ${{ vars.SCCACHE_BUCKET }} | |
SCCACHE_REGION: ${{ vars.SCCACHE_REGION }} | |
SCCACHE_ENDPOINT: ${{ secrets.SCCACHE_ENDPOINT }} | |
SCCACHE_ACCESS_KEY_ID: ${{ secrets.SCCACHE_ACCESS_KEY_ID }} | |
SCCACHE_SECRET_ACCESS_KEY: ${{ secrets.SCCACHE_SECRET_ACCESS_KEY }} | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
prefix-key: v0 | |
save-if: ${{ github.ref == 'refs/heads/main' }} | |
# cache-provider: buildjet | |
- name: Run tests | |
run: cargo miri test --workspace --all-features |