-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (56 loc) · 1.73 KB
/
Copy pathdev.yml
File metadata and controls
67 lines (56 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Dev CI
on:
push:
branches: [ "development", "feature/**" ]
pull_request:
branches: [ "development", "feature/**" ]
jobs:
build-and-test:
name: Build and Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache cargo index
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-git-
- name: Cache build
uses: actions/cache@v4
with:
path: |
target
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-
- name: Build
run: cargo build
- name: Run tests
run: cargo test
- name: Auto-versioning
id: version
run: |
VERSION=dev-${{ github.run_number }}
echo "::set-output name=VERSION::$VERSION"
echo "Version: $VERSION"
- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
name: dbmetaexporter-${{ steps.version.outputs.VERSION }}-${{ matrix.os }}
path: target/debug/
if-no-files-found: error