diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000000..63b38734d9d81 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,60 @@ +name: Main + +on: push + +jobs: + build: + runs-on: ubuntu-latest + container: + image: illinoisrobert/kernel-build + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 1 + + - name: Set ownership + run: | + # this is to fix GIT not liking owner of the checkout dir + # see: https://github.com/actions/runner/issues/2033 + chown -R $(id -u):$(id -g) $PWD + + - name: Build + run: | + make defconfig rob.config memorizer.config + make -j $(expr $(nproc) / 3 + 1) + make -j $(expr $(nproc) / 3 + 1) modules + # deb-pkg didn't work. (I didn't save the error.) + # make -j $(expr $(nproc) / 3 + 1) deb-pkg + make -j $(expr $(nproc) / 3 + 1) tar-pkg + + - name: Test + run: echo I really wish I knew what to do here. + + - name: Patch + if: startsWith(github.ref, 'refs/tags/v') + run: | + set -ex + myref=${{github.ref}} + mytag=$(basename $myref) + baseref=$(echo $myref | sed s/-memor.*//) + basetag=$(basename $baseref) + git fetch --depth=1 origin tag "$basetag" + git diff -p "$basetag" "$myref" > "$mytag.patch" + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + vmlinux + vmlinux*.py + linux-*.tar + arch/x86_64/boot/bzImage + ./*.patch + ../*.deb + + - name: Announce + if: startsWith(github.ref, 'refs/tags/') + run: echo do something here + diff --git a/.gitignore b/.gitignore index 0bbae167bf93e..333f7a1e289a7 100644 --- a/.gitignore +++ b/.gitignore @@ -99,6 +99,7 @@ modules.order !.cocciconfig !.get_maintainer.ignore !.gitattributes +!.github !.gitignore !.kunitconfig !.mailmap