-
Notifications
You must be signed in to change notification settings - Fork 22
102 lines (98 loc) · 2.91 KB
/
ci.yml
File metadata and controls
102 lines (98 loc) · 2.91 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: floki-ci
on:
push:
branches:
- main
pull_request:
branches:
# Trigger on pull requests into main
- main
types: [ opened, synchronize ]
jobs:
lint:
name: Linting and Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Install rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Rust Cache
uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2.8.1
- name: Run cargo clippy to pick up any errors
run: cargo clippy --all-targets -- -Dwarnings
- name: Check code is formatted
run: cargo fmt -- --check
build:
name: Build ${{ matrix.name }}
strategy:
matrix:
include:
- name: linux-stable
os: ubuntu-24.04
rust: stable
artifact_glob: floki-*.tar.gz
artifact_name: dist-linux
upload_artifact: true
rpm: true
allow_failure: false
- name: linux-beta
os: ubuntu-24.04
rust: beta
artifact_glob: floki-*.tar.gz
artifact_name: linux-beta
upload_artifact: false
rpm: false
allow_failure: false
- name: linux-nightly
os: ubuntu-24.04
rust: nightly
artifact_glob: floki-*.tar.gz
artifact_name: linux-nightly
upload_artifact: false
rpm: false
allow_failure: true
- name: macos-stable
os: macos-latest
rust: stable
artifact_glob: floki-*.zip
artifact_name: dist-macos
upload_artifact: true
rpm: false
allow_failure: false
- name: macos-beta
os: macos-latest
rust: beta
artifact_glob: floki-*.zip
artifact_name: macos-beta
upload_artifact: false
rpm: false
allow_failure: false
uses: ./.github/workflows/build-artifacts.yml
with:
runner: ${{ matrix.os }}
toolchain: ${{ matrix.rust }}
artifact_glob: ${{ matrix.artifact_glob }}
artifact_name: ${{ matrix.artifact_name }}
upload_artifact: ${{ matrix.upload_artifact }}
run_tests: true
rpm: ${{ matrix.rpm }}
allow_failure: ${{ matrix.allow_failure }}
fetch_depth: '1'
rpm:
name: Verify RPM installation
runs-on: ubuntu-24.04
needs: build
steps:
- name: Download linux artifacts
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
with:
name: dist-linux
path: dist-linux
- name: Install RPM
run: |
set -euxo pipefail
find dist-linux -name "floki*.rpm" -exec sudo rpm -ivh {} \;
- name: Test installation
run: floki -V