From a98c9e871a047d32a5c5b0d201ccd124c08d5227 Mon Sep 17 00:00:00 2001 From: heckerpowered <72550834+heckerpowered@users.noreply.github.com> Date: Thu, 3 Oct 2024 15:38:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0GitHub=20Action=20Runner=20(#?= =?UTF-8?q?32)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Just for fun * Add self-hosted runner --- .github/workflows/self-hosted.yml | 27 +++++++++++++++++++++++++++ src/Mamba/Core/MambaSignalHandler.cpp | 2 +- xmake.lua | 2 +- 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/self-hosted.yml diff --git a/.github/workflows/self-hosted.yml b/.github/workflows/self-hosted.yml new file mode 100644 index 0000000..4a69a97 --- /dev/null +++ b/.github/workflows/self-hosted.yml @@ -0,0 +1,27 @@ +name: Publish to GitHub (Self Hosted) + +on: + push: + branches: ["main", "github-action"] + pull_request: + branches: ["main"] + +jobs: + build-macOS: + runs-on: self-hosted + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build + run: | + xmake f -p macosx -a arm64 -m release + xmake -y + + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: Mamba + path: | + build/macosx/arm64/release/mamba \ No newline at end of file diff --git a/src/Mamba/Core/MambaSignalHandler.cpp b/src/Mamba/Core/MambaSignalHandler.cpp index 8a1064f..e31a4b8 100644 --- a/src/Mamba/Core/MambaSignalHandler.cpp +++ b/src/Mamba/Core/MambaSignalHandler.cpp @@ -23,7 +23,7 @@ void SignalHandler(int Signal) noexcept fast_io::io::perrln("正在中断"); break; case SIGSEGV: - InternalCompilerError(std::source_location::current(), "谁在用", RandomSelect("Intel"sv, "AMD"sv), "? 害得我内存炸了"); + InternalCompilerError(std::source_location::current(), "谁在用", RandomSelect("Intel"sv, "AMD"sv, "Apple Silicon"sv, "辊斤拷辊斤拷辊斤拷辊斤拷辊斤拷辊斤拷"sv), "? 害得我内存炸了"); case SIGTERM: InternalCompilerError(std::source_location::current(), "终止信号"); default: diff --git a/xmake.lua b/xmake.lua index d653116..4313452 100644 --- a/xmake.lua +++ b/xmake.lua @@ -55,7 +55,7 @@ target("Jvav") add_languages("clatest", "c++latest") set_warnings("all", "extra") add_includedirs(includedirs) - if is_os("macosx") then + if is_os("macosx") or is_os("linux") then add_linkdirs("/opt/homebrew/opt/llvm/lib/c++") -- macOS compability add_includedirs("/opt/homebrew/opt/llvm/include") end