Skip to content

Commit

Permalink
Setup CI for TrueNAS/Linux repository
Browse files Browse the repository at this point in the history
Signed-off-by: Umer Saleem <[email protected]>
  • Loading branch information
Umer Saleem committed Feb 3, 2022
1 parent fc8bb0b commit 154deea
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI

on: [push, pull_request]

jobs:

build_kernel:

runs-on: ubuntu-20.04

steps:

- name: Check out repository code
uses: actions/checkout@v2

- name: Install dependencies
run: |
sudo apt update
sudo apt install -y build-essential gawk flex bison openssl dkms \
libelf-dev libudev-dev libpci-dev libiberty-dev autoconf dwarves \
libncurses-dev libssl-dev
- name: Generate .config
run: |
rm -rf .git .gitattributes .gitignore
make defconfig
make syncconfig
make archprepare
./scripts/kconfig/merge_config.sh .config ./scripts/package/truenas/tn.config
./scripts/kconfig/merge_config.sh .config ./scripts/package/truenas/debug.config
./scripts/package/mkdebian
- name: Build Kernel
run: |
cp .config /tmp/
make distclean
mv /tmp/.config .config
make -j$(nproc) bindeb-pkg
- name: Prepare artifacts
run: |
mkdir -p artifacts
mv ../*.deb ./artifacts/
mv ../*.changes ./artifacts/
mv ../*.buildinfo ./artifacts/
cp .config ./artifacts/
- name: Export artifacts
uses: actions/upload-artifact@v2
with:
name: ${{github.ref_name}}-${{github.sha}}
path: ./artifacts

- name: Status
run: |
echo "Status: ${{job.status}}"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ modules.order
!.gitattributes
!.gitignore
!.mailmap
!.github

#
# Generated include files
Expand Down

0 comments on commit 154deea

Please sign in to comment.