diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6f7270..d321a4d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,10 +6,16 @@ on: jobs: build: - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} steps: - name: Checkout uses: actions/checkout@v6 + with: + path: 'nimedit' - name: Setup Nim @@ -21,11 +27,14 @@ jobs: - name: Nim version run: nim --version - - name: install deps + - name: install deps (Linux only) + if: matrix.os == 'ubuntu-latest' run: | sudo apt update sudo apt install libx11-dev libxft-dev fonts-freefont-ttf fonts-dejavu-core - - name: Build - run: nimble install -y + run: | + cd nimedit + nimble install -y + nim c -r tests/tester.nim diff --git a/app/nimedit.nim b/app/nimedit.nim index aed149d..be254a7 100644 --- a/app/nimedit.nim +++ b/app/nimedit.nim @@ -868,7 +868,7 @@ proc runAction(ed: Editor; action: Action; arg: string; shiftKeyPressed: bool): if ed.buffersCounter >= 2: moveTabToRightWindow(ed) - of Action.QuitApplication: input.quitRequest() + of Action.QuitApplication: input.shutdown() of Action.Declarations: if main.lang == langNim: main.filterLines = not main.filterLines @@ -1197,4 +1197,4 @@ proc mainProc(ed: Editor) = initBackend() mainProc(Editor()) -input.quitRequest() +input.shutdown() diff --git a/app/styles.nim b/app/styles.nim index faaac99..b69cfff 100644 --- a/app/styles.nim +++ b/app/styles.nim @@ -74,7 +74,7 @@ proc findStyledFontFile(mainFontFile: Path; style: FontStyle): Path = fmt"Could not find font file that matches style {style}!") proc fatal*(msg: string) {.noReturn.} = - quitRequest() + shutdown() quit(msg) proc parseColor*(hex: string): Color = diff --git a/tests/tester.nim b/tests/tester.nim new file mode 100644 index 0000000..222b087 --- /dev/null +++ b/tests/tester.nim @@ -0,0 +1,8 @@ +import std/os + +proc fatal(msg: string) = quit "FAILURE " & msg + +proc exec(cmd: string) = + if execShellCmd(cmd) != 0: fatal cmd + +exec "nim c app/nimedit.nim"