1
0
Mirror von https://github.com/Chaoscaot/schemsearch synchronisiert 2024-11-08 13:20:13 +01:00
schemsearch/.github/workflows/master-build.yml
2023-04-04 00:36:40 +02:00

55 Zeilen
1.3 KiB
YAML

name: Master Build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache Cargo modules
id: cache-cargo
uses: actions/cache@v3
env:
cache-name: cache-cargo-target-debug
with:
path: target
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Build
run: make debug
- name: Run tests
run: cargo test --verbose -p schemsearch-lib
build-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache Cargo modules
id: cache-cargo
uses: actions/cache@v3
env:
cache-name: cache-cargo-target-release
with:
path: target
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Build
run: make
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.2
with:
name: schemsearch-cli
path: target/release/schemsearch-cli