From fd57a5626b3d68e8c4c78848332e7fe59b343611 Mon Sep 17 00:00:00 2001 From: fanbingxin Date: Sat, 3 Jul 2021 17:03:36 +0800 Subject: [PATCH] prepare for release (#24) --- .github/workflows/ci.yaml | 11 ++++++++++- README.md | 15 ++++++++------- magefile.go | 2 +- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 84ab1e9..c762475 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,4 +1,4 @@ -on: [pull_request] +on: [push, pull_request] name: CI jobs: ubuntu-latest: @@ -25,6 +25,15 @@ jobs: diff -u <(echo -n) <(gofmt -d $(find . -type f -name '*.go')) mage -v iso + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: eggos.iso + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + macos-latest: runs-on: macos-latest steps: diff --git a/README.md b/README.md index 1b5e3be..bd84b91 100644 --- a/README.md +++ b/README.md @@ -38,28 +38,29 @@ In general, writing kernel in Go is a very interesting experience. On the one ha # Dependencies - Go 1.13.x (only tested on Go1.13.x) -- i386-elf-gcc +- gcc - qemu +- mage ## MacOS ``` bash -$ brew tap nativeos/i386-elf-toolchain -$ brew install i386-elf-binutils i386-elf-gcc i386-elf-gdb +$ go get github.com/magefile/mage +$ brew install x86_64-elf-binutils x86_64-elf-gcc x86_64-elf-gdb $ brew install qemu ``` ## Ubuntu ``` bash +$ go get github.com/magefile/mage $ sudo apt-get install build-essential qemu ``` # Quickstart ``` bash -$ make -$ make qemu +$ mage qemu ``` # Debug @@ -69,12 +70,12 @@ You can directly use the gdb command to debug, or use vscode for graphical debug First you need to install gdb, if you are under macos, execute the following command ``` bash -brew install i386-elf-gdb +brew install x86_64-elf-gdb ``` Use the extension `Native Debug` in vscode to support debugging with gdb -First execute the `make qemu-debug` command to let qemu start the gdb server, and then use the debug function of vscode to start a debug session. The debug configuration file of vscode is built into the project. +First execute the `mage qemudebug` command to let qemu start the gdb server, and then use the debug function of vscode to start a debug session. The debug configuration file of vscode is built into the project. Go provides simple support for gdb, see [Debugging Go Code with GDB](https://golang.org/doc/gdb) for details diff --git a/magefile.go b/magefile.go index 37ee0e5..4803985 100644 --- a/magefile.go +++ b/magefile.go @@ -26,7 +26,7 @@ var ( ) var ( - GOTAGS = "" + GOTAGS = "nes" ) var (