1
0
Mirror von https://github.com/Chaoscaot/schemsearch synchronisiert 2024-11-16 17:00:14 +01:00
schemsearch/.github/workflows/master-build.yml

59 Zeilen
1.3 KiB
YAML

2023-03-16 19:15:46 +01:00
name: Master Build
on:
push:
branches: [ "master" ]
2023-03-16 19:22:57 +01:00
pull_request:
branches: [ "master" ]
2023-03-16 19:15:46 +01:00
env:
CARGO_TERM_COLOR: always
jobs:
2023-03-16 19:22:57 +01:00
build:
2023-03-16 19:32:09 +01:00
2023-03-16 19:22:57 +01:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
2023-03-18 10:27:34 +01:00
- name: Cache Cargo modules
id: cache-cargo
uses: actions/cache@v3
2023-04-05 13:05:15 +02:00
continue-on-error: false
2023-03-18 10:27:34 +01:00
with:
2023-04-05 13:05:15 +02:00
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
2023-03-18 10:27:34 +01:00
restore-keys: |
2023-04-05 13:05:15 +02:00
${{ runner.os }}-cargo-
2023-03-16 19:22:57 +01:00
- name: Build
2023-04-04 00:36:40 +02:00
run: make debug
2023-03-16 19:32:09 +01:00
- name: Run tests
2023-03-16 20:40:17 +01:00
run: cargo test --verbose -p schemsearch-lib
2023-03-16 19:32:09 +01:00
2023-03-18 10:27:34 +01:00
build-release:
2023-04-05 13:07:14 +02:00
needs:
- build
2023-03-16 19:23:08 +01:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
2023-03-18 10:27:34 +01:00
- name: Cache Cargo modules
id: cache-cargo
uses: actions/cache@v3
2023-04-05 13:05:15 +02:00
continue-on-error: false
2023-03-18 10:27:34 +01:00
with:
2023-04-05 13:05:15 +02:00
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
2023-03-18 10:27:34 +01:00
restore-keys: |
2023-04-05 13:05:15 +02:00
${{ runner.os }}-cargo-
2023-03-16 19:23:08 +01:00
- name: Build
2023-04-04 00:36:40 +02:00
run: make
2023-03-16 19:23:08 +01:00
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.2
with:
name: schemsearch-cli
path: target/release/schemsearch-cli