-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
- Loading branch information
Showing
1 changed file
with
81 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
on: | ||
push: | ||
branches: | ||
- '**' | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
tests: | ||
runs-on: ${{ matrix.runs_on }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- displayTargetName: ubuntu-22.04 | ||
os: unix | ||
runs_on: ubuntu-22.04 | ||
shell: bash | ||
defconfig: defconfig | ||
- displayTargetName: ubuntu-22.04 (nommu) | ||
os: unix | ||
runs_on: ubuntu-22.04 | ||
shell: bash | ||
defconfig: x86_64_nommu_defconfig | ||
timeout-minutes: 100 | ||
env: | ||
CCACHE_DIR: ${{ github.workspace }}/.ccache | ||
USE_CCACHE: 1 | ||
|
||
defaults: | ||
run: | ||
shell: ${{ matrix.shell }} | ||
|
||
steps: | ||
- name: Set env | ||
shell: bash | ||
run: | | ||
echo "/usr/lib/ccache/bin:/usr/lib/ccache:${{ github.workspace }}/bin" >> $GITHUB_PATH | ||
echo "export PATH=/usr/lib/ccache/bin:/usr/lib/ccache:${{ github.workspace }}/bin:$PATH" >> $HOME/.bashrc | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.CCACHE_DIR }} | ||
key: ${{ runner.os }}-ccache-build-${{ github.sha }} | ||
restore-keys: ${{ runner.os }}-ccache-build- | ||
- name: Install packages | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt update -y | ||
sudo apt install -y ccache libseccomp-dev | ||
- name: Build | ||
run: | | ||
make ARCH=um ${{ matrix.defconfig }} | ||
make -j8 ARCH=um | ||
- name: Tests | ||
run: | | ||
vmlinux ubd0=./alpine-test.ext3 rw mem=1024m loglevel=8 init=/init.sh uname -a | ||
- name: Save test results | ||
uses: actions/upload-artifact@v2 | ||
if: success() || failure() | ||
with: | ||
name: test-results-${{ matrix.displayTargetName }} | ||
path: /tmp/junit/*.xml | ||
|
||
checkpatch: | ||
runs-on: ubuntu-22.04 | ||
name: checkpatch | ||
steps: | ||
- name: Checkout | ||
with: | ||
fetch-depth: 0 | ||
uses: actions/checkout@v2 | ||
- name: Install pip dependencies | ||
run: sudo pip install ply GitPython | ||
- name: Check coding style | ||
run: | | ||
git format-patch -o p1 v6.10 | ||
for f in `ls p1/*` ; do cat $f | scripts/checkpatch.pl - ; done |