2019-08-31 09:04:46 +00:00
|
|
|
name: Ubuntu
|
|
|
|
|
2020-09-15 11:05:27 +00:00
|
|
|
on: [push, pull_request]
|
2019-08-31 09:04:46 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2020-01-05 07:21:39 +00:00
|
|
|
name: Build on Ubuntu
|
2019-08-31 09:04:46 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: go build
|
|
|
|
|
2019-12-26 06:12:42 +00:00
|
|
|
test-unit:
|
|
|
|
name: Unit Testing
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
|
2019-08-31 09:04:46 +00:00
|
|
|
- name: Install dependencies for tests
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2023-01-24 15:32:04 +00:00
|
|
|
sudo apt-get install qemu-system-x86
|
2019-08-31 09:04:46 +00:00
|
|
|
|
|
|
|
- name: Bootstrap
|
2023-04-09 14:16:29 +00:00
|
|
|
run: ./tools/qemu-ubuntu-img/bootstrap.sh
|
2019-08-31 09:04:46 +00:00
|
|
|
|
2019-12-26 06:12:42 +00:00
|
|
|
- name: Unit Testing
|
2019-08-31 09:04:46 +00:00
|
|
|
run: go test -parallel 1 -v ./...
|
2019-12-26 06:12:42 +00:00
|
|
|
|
2023-05-10 10:25:19 +00:00
|
|
|
test-end-to-end-examples:
|
2023-05-10 10:20:15 +00:00
|
|
|
name: E2E Testing (Examples)
|
2019-12-26 06:12:42 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: go build
|
|
|
|
|
|
|
|
- name: Install dependencies for tests
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2023-01-24 15:32:04 +00:00
|
|
|
sudo apt-get install qemu-system-x86
|
2019-12-26 06:12:42 +00:00
|
|
|
|
|
|
|
- name: End-to-End Testing [Kernel Module]
|
|
|
|
run: |
|
|
|
|
cd examples/kernel-module
|
2023-04-06 14:50:58 +00:00
|
|
|
../../out-of-tree --log-level=debug kernel autogen --max=1
|
|
|
|
../../out-of-tree --log-level=debug pew --qemu-timeout=10m
|
2019-12-26 06:12:42 +00:00
|
|
|
|
|
|
|
- name: End-to-End Testing [Kernel Exploit]
|
|
|
|
run: |
|
|
|
|
cd examples/kernel-exploit
|
2023-04-06 14:50:58 +00:00
|
|
|
../../out-of-tree --log-level=debug kernel autogen --max=1
|
|
|
|
../../out-of-tree --log-level=debug pew --threshold=0 --qemu-timeout=10m
|
2023-04-06 11:50:18 +00:00
|
|
|
|
2023-05-10 10:20:15 +00:00
|
|
|
- name: End-to-End Testing [Script]
|
|
|
|
run: |
|
|
|
|
cd examples/script
|
|
|
|
../../out-of-tree --log-level=debug kernel autogen --max=1
|
|
|
|
../../out-of-tree --log-level=debug pew --qemu-timeout=10m
|
|
|
|
|
|
|
|
- name: End-to-End Testing [Preload]
|
|
|
|
run: |
|
|
|
|
cd examples/preload
|
|
|
|
../../out-of-tree --log-level=debug kernel autogen --max=1
|
|
|
|
../../out-of-tree --log-level=debug pew --qemu-timeout=10m
|
|
|
|
|
2023-04-06 20:14:36 +00:00
|
|
|
- name: Archive logs
|
2023-05-12 07:59:58 +00:00
|
|
|
if: always()
|
2023-04-06 20:14:36 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2023-05-10 10:25:19 +00:00
|
|
|
name: test-end-to-end-examples-logs
|
|
|
|
path: /home/runner/.out-of-tree/logs
|
2023-05-10 09:09:12 +00:00
|
|
|
|
2023-05-10 10:25:19 +00:00
|
|
|
test-end-to-end:
|
2023-05-10 10:20:15 +00:00
|
|
|
name: E2E Testing
|
2023-05-10 09:36:19 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-05-10 10:06:05 +00:00
|
|
|
os: [
|
|
|
|
{ distro: Ubuntu, release: 12.04 },
|
|
|
|
{ distro: Ubuntu, release: 14.04 },
|
|
|
|
{ distro: Ubuntu, release: 16.04 },
|
|
|
|
{ distro: Ubuntu, release: 18.04 },
|
|
|
|
{ distro: Ubuntu, release: 20.04 },
|
|
|
|
{ distro: Ubuntu, release: 22.04 },
|
|
|
|
{ distro: CentOS, release: 6 },
|
|
|
|
{ distro: CentOS, release: 7 },
|
|
|
|
{ distro: CentOS, release: 8 },
|
|
|
|
{ distro: OracleLinux, release: 6 },
|
|
|
|
{ distro: OracleLinux, release: 7 },
|
2023-05-11 23:22:44 +00:00
|
|
|
{ distro: OracleLinux, release: 8 }
|
|
|
|
# { distro: OracleLinux, release: 9 }
|
2023-05-10 10:04:22 +00:00
|
|
|
]
|
2023-05-10 09:36:19 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: go build
|
|
|
|
|
|
|
|
- name: Install dependencies for tests
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install qemu-system-x86
|
|
|
|
|
2023-05-10 10:02:12 +00:00
|
|
|
- name: End-to-End Testing [${{ matrix.os.distro }} ${{ matrix.os.release }}]
|
2023-05-10 09:36:19 +00:00
|
|
|
run: |
|
|
|
|
mkdir test
|
|
|
|
cd test
|
|
|
|
|
|
|
|
echo 'name = "out-of-tree script"' >> .out-of-tree.toml
|
|
|
|
echo 'type = "script"' >> .out-of-tree.toml
|
|
|
|
echo 'script = "script.sh"' >> .out-of-tree.toml
|
|
|
|
echo '[[supported_kernels]]' >> .out-of-tree.toml
|
2023-05-10 10:02:12 +00:00
|
|
|
echo 'distro_type = "${{ matrix.os.distro }}"' >> .out-of-tree.toml
|
|
|
|
echo 'distro_release = "${{ matrix.os.release }}"' >> .out-of-tree.toml
|
2023-05-10 09:36:19 +00:00
|
|
|
echo 'release_mask = ".*"' >> .out-of-tree.toml
|
|
|
|
|
|
|
|
echo -e '#!/bin/sh\necho ok' >> script.sh
|
|
|
|
|
2023-05-10 10:02:12 +00:00
|
|
|
../out-of-tree --log-level=debug kernel list-remote --distro=${{ matrix.os.distro }} --ver=${{ matrix.os.release }}
|
2023-05-10 09:36:19 +00:00
|
|
|
../out-of-tree --log-level=debug kernel autogen --max=1 --shuffle
|
|
|
|
../out-of-tree --log-level=debug pew --qemu-timeout=10m
|
|
|
|
|
|
|
|
- name: Archive logs
|
2023-05-12 07:59:58 +00:00
|
|
|
if: always()
|
2023-05-10 09:36:19 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2023-05-10 10:25:19 +00:00
|
|
|
name: test-end-to-end-${{ matrix.os.distro }}-${{ matrix.os.release }}-logs
|
|
|
|
path: /home/runner/.out-of-tree/logs
|