Skip to content

Commit 23dc015

Browse files
StringyMolter73
andcommitted
Cleanup/Misc changes from PR review
Co-authored-by: Mauro Ezequiel Moltrasio <[email protected]>
1 parent 7ce1860 commit 23dc015

File tree

3 files changed

+25
-25
lines changed

3 files changed

+25
-25
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -63,22 +63,40 @@ jobs:
6363
key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ steps.args.outputs.args }}-${{ hashFiles('**/Cargo.lock') }}
6464
- run: cargo ${{ matrix.args }}
6565

66+
vars:
67+
runs-on: ubuntu-24.04
68+
outputs:
69+
tag: ${{ steps.vars.outputs.tag }}
70+
image-name: ${{ steps.vars.outputs.image-name }}
71+
steps:
72+
- uses: actions/checkout@v4
73+
with:
74+
submodules: true
75+
76+
- id: vars
77+
run: |
78+
cat << EOF >> "$GITHUB_OUTPUT"
79+
tag="$(make tag)"
80+
image-name="$(make image-name)"
81+
EOF
82+
6683
container:
84+
needs:
85+
- vars
6786
strategy:
6887
fail-fast: false
6988
matrix:
7089
arch:
7190
- amd64
7291
- arm64
7392
runs-on: ${{ (matrix.arch == 'arm64' && 'ubuntu-24.04-arm') || 'ubuntu-24.04' }}
93+
env:
94+
FACT_TAG: ${{ needs.vars.outputs.tag }}-${{ matrix.arch }}
7495
steps:
7596
- uses: actions/checkout@v4
7697
with:
7798
submodules: true
7899

79-
- run: |
80-
echo "FACT_TAG=$(make tag)-${{ matrix.arch }}" >> "$GITHUB_ENV"
81-
82100
- run: make image
83101

84102
- name: Login to quay.io/stackrox-io
@@ -90,23 +108,6 @@ jobs:
90108

91109
- run: docker push "$(make image-name)"
92110

93-
vars:
94-
runs-on: ubuntu-24.04
95-
outputs:
96-
tag: ${{ steps.vars.outputs.tag }}
97-
image-name: ${{ steps.vars.outputs.image-name }}
98-
steps:
99-
- uses: actions/checkout@v4
100-
with:
101-
submodules: true
102-
103-
- id: vars
104-
run: |
105-
{
106-
echo "tag=$(make tag)"
107-
echo "image-name=$(make image-name)"
108-
} >> "$GITHUB_OUTPUT"
109-
110111
manifest:
111112
runs-on: ubuntu-24.04
112113
needs:

.github/workflows/integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
type: string
1919
default: ''
2020

21-
# this is temporary, will be removed once Konflux builds have been
21+
# TODO: Remove once Konflux builds have been
2222
# modified to support Arm
2323
vm_list:
2424
description: JSON list of VMs to test on

fact/build.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ use std::{
55
process::Command,
66
};
77

8-
fn compile_bpf(out_dir: &Path, arch: &str) -> anyhow::Result<()> {
8+
fn compile_bpf(out_dir: &Path) -> anyhow::Result<()> {
99
let obj = match out_dir.join("main.o").into_os_string().into_string() {
1010
Ok(s) => s,
1111
Err(os_string) => anyhow::bail!("Failed to convert path to string {:?}", os_string),
1212
};
1313

14-
let target_arch = format!("-D__TARGET_ARCH_{}", arch);
14+
let target_arch = format!("-D__TARGET_ARCH_{}", env::var("CARGO_CFG_TARGET_ARCH")?);
1515

1616
match Command::new("clang")
1717
.args([
@@ -55,7 +55,6 @@ fn main() -> anyhow::Result<()> {
5555
let out_dir: PathBuf = env::var("OUT_DIR")
5656
.context("Failed to interpret OUT_DIR environment variable")?
5757
.into();
58-
let arch = env::var("CARGO_CFG_TARGET_ARCH")?;
59-
compile_bpf(&out_dir, &arch).context("Failed to compile eBPF")?;
58+
compile_bpf(&out_dir).context("Failed to compile eBPF")?;
6059
generate_bindings(&out_dir)
6160
}

0 commit comments

Comments
 (0)