diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000000..9a5be37fcbc7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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}}" \ No newline at end of file diff --git a/.gitignore b/.gitignore index 67d2f3503128..fcef5319ae64 100644 --- a/.gitignore +++ b/.gitignore @@ -95,6 +95,7 @@ modules.order !.gitattributes !.gitignore !.mailmap +!.github # # Generated include files