Skip to content

Commit

Permalink
cleanup(ci): use new kernel-testing provided composite action.
Browse files Browse the repository at this point in the history
Moreover, bumped the framework to v0.3.0.

Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP authored and poiana committed Feb 9, 2024
1 parent 36ab409 commit 08ae1c0
Showing 1 changed file with 7 additions and 59 deletions.
66 changes: 7 additions & 59 deletions .github/workflows/reusable_kernel_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,71 +38,19 @@ jobs:
architecture: [X64, ARM64]
runs-on: [ "self-hosted", "linux", "${{matrix.architecture}}" ]
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: falcosecurity/[email protected]
id: kernel_tests
with:
repository: falcosecurity/kernel-testing
ref: v0.2.3

- name: Generate vars yaml
working-directory: ./ansible-playbooks
run: |
cat > vars.yml <<EOF
run_id: "id-${{ github.run_id }}"
output_dir: "~/ansible_output_${{ github.run_id }}"
repos:
libs: {name: "falcosecurity-libs", repo: "https://github.com/${{ inputs.libsrepo }}.git", version: "${{ inputs.libsversion }}"}
EOF
- name: Bootstrap VMs
working-directory: ./ansible-playbooks
run: |
ansible-playbook bootstrap.yml --extra-vars "@vars.yml"
- name: Common setup
working-directory: ./ansible-playbooks
run: |
ansible-playbook common.yml --extra-vars "@vars.yml"
- name: Prepare github repos
working-directory: ./ansible-playbooks
run: |
ansible-playbook git-repos.yml --extra-vars "@vars.yml"
- name: Run scap-open tests
working-directory: ./ansible-playbooks
run: |
ansible-playbook scap-open.yml --extra-vars "@vars.yml" || :
- name: Tar output files
run: |
tar -cvf ansible_output.tar ~/ansible_output_${{ github.run_id }}
libsversion: ${{ inputs.libsversion }}
libsrepo: ${{ inputs.libsrepo }}
build_matrix: 'true'

- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: ansible_output_${{matrix.architecture}}
path: ansible_output.tar

- name: Build matrix_gen
working-directory: ./matrix_gen
env:
GOPATH: /root/go
GOCACHE: /root/.cache/go-build
run: |
go build .
- name: Generate new matrix
working-directory: ./matrix_gen
run: |
./matrix_gen --root-folder ~/ansible_output_${{ github.run_id }} --output-file matrix_${{matrix.architecture}}.md
path: ${{ steps.kernel_tests.outputs.ansible_output }}

- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: matrix_${{matrix.architecture}}
path: ./matrix_gen/matrix_${{matrix.architecture}}.md

- name: Cleanup
if: always()
working-directory: ./ansible-playbooks
run: |
ansible-playbook clean-up.yml --extra-vars "@vars.yml" || :
path: ${{ steps.kernel_tests.outputs.matrix_output }}

0 comments on commit 08ae1c0

Please sign in to comment.