Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Commit

Permalink
Release v0.1.0 (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
AurevoirXavier authored Jun 23, 2023
1 parent 48ac2ad commit 7e41d52
Show file tree
Hide file tree
Showing 28 changed files with 7,029 additions and 91 deletions.
38 changes: 15 additions & 23 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,24 @@ on:
- main

env:
CARGO_INCREMENTAL: 1
CARGO_TERM_COLOR: always

GITHUB_CACHE_VERSION: 1
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

RUST_BACKTRACE: full
RUSTC_WRAPPER: sccache

SCCACHE_LINK: https://github.com/mozilla/sccache/releases/download
SCCACHE_VERSION: v0.3.0
SCCACHE_DIR: /home/runner/.cache/sccache

jobs:
cargo_checks:
cargo-checks:
name: Task cargo ${{ matrix.action }}
runs-on: ubuntu-latest
strategy:
matrix:
action: [clippy, nextest]
action: [clippy, fmt, nextest]
steps:
- name: Fetch latest code
uses: actions/checkout@v3
- name: Install Sccache
run: |
export SCCACHE_FILE=sccache-${{ env.SCCACHE_VERSION }}-x86_64-unknown-linux-musl
curl -L ${{ env.SCCACHE_LINK }}/${{ env.SCCACHE_VERSION }}/$SCCACHE_FILE.tar.gz | tar xz
sudo mv $SCCACHE_FILE/sccache /usr/bin
sudo chmod u+x /usr/bin/sccache
- name: Cache cargo
uses: actions/cache@v3
with:
Expand All @@ -45,24 +35,26 @@ jobs:
target
key: cargo-${{ env.GITHUB_CACHE_VERSION }}-${{ matrix.action }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: cargo-${{ env.GITHUB_CACHE_VERSION }}-${{ matrix.action }}-
- name: Cache sccache
uses: actions/cache@v3
with:
path: ${{ env.SCCACHE_DIR}}
key: sccache-${{ env.GITHUB_CACHE_VERSION }}-${{ matrix.action }}--${{ hashFiles('**/Cargo.lock') }}
restore-keys: sccache-${{ env.GITHUB_CACHE_VERSION }}-${{ matrix.action }}-
- name: Cargo ${{ matrix.action }}
if: matrix.action == 'clippy'
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --workspace --all-features --all-targets --locked
- name: Cargo ${{ matrix.action }}
if: matrix.action == 'fmt'
run: cargo ${{ matrix.action }} --all -- --check
- name: Install cargo-nextest
if: matrix.action == 'nextest'
uses: taiki-e/install-action@nextest
- name: Cargo nextest
- name: Cargo ${{ matrix.action }}
if: matrix.action == 'nextest'
uses: actions-rs/cargo@v1
# Skip `node-test` feature.
run: cargo ${{ matrix.action }} run --release --workspace --all-targets --locked
- name: Fast fail
uses: vishnudxb/cancel-workflow@v1.2
if: failure()
with:
command: nextest
args: run --workspace --all-features --all-targets --locked
repo: hack-ink/slothunter
workflow_id: ${{ github.run_id }}
access_token: ${{ github.token }}
34 changes: 0 additions & 34 deletions .github/workflows/pages.yml

This file was deleted.

11 changes: 4 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,15 @@ jobs:
- name: Setup Rust toolchain
run: rustup target add ${{ matrix.target.name }}
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --locked --target ${{ matrix.target.name }}
run: cargo build --release --locked --target ${{ matrix.target.name }}
- name: Compress
run: |
mv target/${{ matrix.target.name }}/release/<NAME>${{ matrix.target.extension }} .
zstd --ultra -22 -o <NAME>-${{ matrix.target.name }}.zst <NAME>${{ matrix.target.extension }}
mv target/${{ matrix.target.name }}/release/slothunter${{ matrix.target.extension }} .
zstd --ultra -22 -o slothunter-${{ matrix.target.name }}.zst slothunter${{ matrix.target.extension }}
- name: Collect artifact
run: |
mkdir -p artifacts
mv <NAME>-${{ matrix.target.name }}.zst artifacts
mv slothunter-${{ matrix.target.name }}.zst artifacts
- name: Upload artifact
uses: actions/upload-artifact@v3.1.2
with:
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,15 @@ jobs:
- name: Setup Rust toolchain
run: rustup target add ${{ matrix.target.name }}
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --locked --target ${{ matrix.target.name }}
run: cargo build --release --locked --target ${{ matrix.target.name }}
- name: Compress
run: |
mv target/${{ matrix.target.name }}/release/<NAME>${{ matrix.target.extension }} .
zstd --ultra -22 -o <NAME>-${{ matrix.target.name }}.zst <NAME>${{ matrix.target.extension }}
mv target/${{ matrix.target.name }}/release/slothunter${{ matrix.target.extension }} .
zstd --ultra -22 -o slothunter-${{ matrix.target.name }}.zst slothunter${{ matrix.target.extension }}
- name: Collect artifact
run: |
mkdir -p artifacts
mv <NAME>-${{ matrix.target.name }}.zst artifacts
mv slothunter-${{ matrix.target.name }}.zst artifacts
- name: Upload artifact
uses: actions/upload-artifact@v3.1.2
with:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ book
index.html

# Test data
test-data
test/integration/data
test/integration/secret.toml
Loading

0 comments on commit 7e41d52

Please sign in to comment.