-
Notifications
You must be signed in to change notification settings - Fork 22
104 lines (100 loc) · 2.99 KB
/
ci.yml
File metadata and controls
104 lines (100 loc) · 2.99 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
103
104
name: floki-ci
on:
push:
branches:
- main
pull_request:
branches:
# Trigger on pull requests into main
- main
types: [ opened, synchronize ]
# Enable merge queues
merge_group:
jobs:
lint:
name: Linting and Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Install rust
uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master
with:
toolchain: stable
- name: Rust Cache
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.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@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
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