@@ -12,6 +12,125 @@ permissions:
1212 contents : read
1313
1414jobs :
15+ build-clean-caches-clippy :
16+ name : Build clean caches
17+ runs-on : ${{ matrix.os }}
18+ matrix :
19+ os : [ ubuntu-latest ]
20+ component : [ clippy ]
21+ steps :
22+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
23+
24+ - uses : ./.github/actions/install-rust-toolchain
25+ with :
26+ components : clippy
27+
28+ - uses : ./.github/actions/rust-cache
29+ with :
30+ identifier : ' clippy'
31+ restore-strategy : ${{ github.ref == 'refs/heads/main' && 'exact' || 'nearest' }}
32+ save-cache : true
33+
34+ - name : cargo clippy with compiler warnings
35+ run : cargo clippy --workspace --all-targets -- -D warnings -D clippy::all
36+
37+ build-clean-caches-test-dev :
38+ name : Build clean caches
39+ runs-on : ${{ matrix.os }}
40+ matrix :
41+ os : [ ubuntu-latest ]
42+ component : [ ]
43+ steps :
44+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
45+
46+ - uses : ./.github/actions/install-rust-toolchain
47+
48+ - uses : ./.github/actions/rust-cache
49+ with :
50+ identifier : ' test-dev'
51+ restore-strategy : ${{ github.ref == 'refs/heads/main' && 'exact' || 'nearest' }}
52+ save-cache : true
53+
54+ - name : Install Zig
55+ uses : mlugg/setup-zig@8d6198c65fb0feaa111df26e6b467fea8345e46f # v2
56+
57+ - name : cargo clippy with compiler warnings
58+ run : |
59+ cargo test --no-run --workspace --exclude 'newrelic_agent_control' --all-targets -- --include-ignored
60+ make -C agent-control test/cache
61+
62+ build-clean-caches-coverage :
63+ name : Build clean caches
64+ runs-on : ${{ matrix.os }}
65+ matrix :
66+ os : [ ubuntu-latest ]
67+ component : [ llvm-tools-preview ]
68+ steps :
69+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
70+
71+ - uses : ./.github/actions/install-rust-toolchain
72+ with :
73+ components : llvm-tools-preview
74+
75+ - name : cargo install cargo-llvm-cov
76+ uses : taiki-e/install-action@71765c00dd3e08a5484a5b9e82a4c88b86520e0e # 71765c00dd3e08a5484a5b9e82a4c88b86520e0e
77+
78+ - uses : ./.github/actions/rust-cache
79+ with :
80+ identifier : ' coverage'
81+ restore-strategy : ${{ github.ref == 'refs/heads/main' && 'exact' || 'nearest' }}
82+ save-cache : true
83+
84+ - name : Generate coverage report
85+ run : COVERAGE_OUT_FORMAT=json COVERAGE_OUT_FILEPATH=jcov.info make coverage
86+
87+ build-clean-caches-release :
88+ name : Build clean caches
89+ runs-on : ${{ matrix.os }}
90+ matrix :
91+ os : [ ubuntu-latest ]
92+ component : [ clippy ]
93+ steps :
94+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
95+
96+ - uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
97+ with :
98+ go-version-file : ' build/embedded/go.mod'
99+ check-latest : true
100+
101+ - uses : ./.github/actions/install-rust-toolchain
102+ with :
103+ targets : >-
104+ aarch64-unknown-linux-musl,
105+ x86_64-unknown-linux-musl,
106+ x86_64-pc-windows-msvc
107+
108+ - name : Install Zig
109+ uses : mlugg/setup-zig@8d6198c65fb0feaa111df26e6b467fea8345e46f # v2
110+
111+ - name : Install cargo-zigbuild
112+ run : |
113+ cargo install --locked cargo-zigbuild --force
114+
115+ - name : Install Windows cross-compilation dependencies
116+ run : |
117+ sudo apt-get install -y llvm
118+
119+ - name : Install cargo-xwin
120+ run : |
121+ cargo install --locked cargo-xwin --force
122+
123+ - uses : ./.github/actions/rust-cache
124+ with :
125+ identifier : ' release'
126+ restore-strategy : ${{ github.ref == 'refs/heads/main' && 'exact' || 'nearest' }}
127+ save-cache : true
128+
129+ - name : Build k8s in release mode
130+ run : cargo zigbuild --release --package newrelic_agent_control --bin newrelic-agent-control-k8s --target x86_64-unknown-linux-musl
131+ - name : Build onhost in release mode
132+ run : cargo zigbuild --release --package newrelic_agent_control --bin newrelic-agent-control --target x86_64-unknown-linux-musl
133+
15134 build-packages :
16135 name : Build packages
17136 uses : ./.github/workflows/component_packages.yml
0 commit comments