tek/.forgejo/workflows/test.yaml

49 lines
1.6 KiB
YAML

on:
push:
branches: '*'
jobs:
build:
container: { image: "alpine:edge" }
steps:
- name: install deps
run: apk add --no-cache nodejs tree rustup git just cloc build-base clang20-dev pipewire-jack-dev lilv-dev serd-dev
- run: git clone --depth 1 --recursive $GITHUB_SERVER_URL/$GITHUB_REPOSITORY .
- run: whoami && pwd && tree && cloc src/ && cloc .
- id: cache
name: cache restore
uses: https://data.forgejo.org/actions/cache/restore@v4
with:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
- name: cache hit
if: steps.cache.outputs.cache-hit == 'true'
run: echo "cache hit! :)"
- name: cache miss
if: steps.cache.outputs.cache-miss != 'true'
run: echo "cache miss! :("
- run: cloc src/ && cloc .
- run: rustup-init -y
- run: source "$HOME/.cargo/env" && rustup install nightly && rustup default nightly && cargo version -vv
- run: source "$HOME/.cargo/env" && RUSTFLAGS="-Ctarget-feature=-crt-static" just test
- run: tree
- name: cache save
uses: https://data.forgejo.org/actions/cache/save@v4
with:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/