new(ci): add a sample kmod source to test that we are able to build a kmod after kernel headers are installed #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test composite action | |
on: | |
pull_request: | |
paths: | |
- 'action.yml' | |
workflow_dispatch: | |
jobs: | |
test-composite-action: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Echo kernelrelease | |
run: uname -a | |
- name: Test action | |
uses: ./ | |
with: | |
cache: 'true' | |
- name: Check kernel sources | |
run: ls -la /usr/src | |
test-composite-action-cached: | |
runs-on: ubuntu-latest | |
needs: test-composite-action | |
steps: | |
- name: Echo kernelrelease | |
run: uname -a | |
- name: Store KERNEL_RELEASE | |
shell: bash | |
run: | | |
echo "KERNEL_RELEASE=$(uname -r)" >> $GITHUB_ENV | |
- name: Check kernel sources (empty) | |
run: ls -la /usr/src | |
- name: Retrieve cached kernel sources | |
uses: actions/cache@v4 | |
with: | |
path: | | |
/usr/src/linux | |
key: ${{ runner.os }}-${{ runner.arch }}-${{env.KERNEL_RELEASE}} | |
- name: Check kernel sources again | |
run: ls -la /usr/src |