From e446f8aa7e8b8f175ec119a91bbdc0050660c75a Mon Sep 17 00:00:00 2001 From: Yuyi Wang Date: Thu, 5 Jan 2023 00:07:16 +0800 Subject: [PATCH 1/2] Debug build when PR. --- .github/workflows/debug.yml | 45 +++++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 1 + Makefile | 4 +++- bins/Makefile | 4 +++- 4 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/debug.yml diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml new file mode 100644 index 00000000..13e33671 --- /dev/null +++ b/.github/workflows/debug.yml @@ -0,0 +1,45 @@ +name: Debug +on: + pull_request: + branches: ["master"] + paths: + - 'utils/**' + - 'bins/**' +jobs: + Build: + strategy: + matrix: + platform: + - name: linux-x64 + os: ubuntu-latest + target: x86_64-unknown-linux-gnu + postfix: + - name: windows-x64 + os: windows-latest + target: x86_64-pc-windows-msvc + postfix: .exe + - name: windows-arm64 + os: windows-latest + target: aarch64-pc-windows-msvc + postfix: .exe + - name: macos-x64 + os: macos-latest + target: x86_64-apple-darwin + postfix: + - name: macos-arm64 + os: macos-latest + target: aarch64-apple-darwin + postfix: + runs-on: ${{ matrix.platform.os }} + steps: + - uses: actions/checkout@v2 + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y libwebkit2gtk-4.0-dev + if: matrix.platform.name == 'linux-x64' + - name: Install targets + run: | + rustup target add ${{ matrix.platform.target }} + - name: Build + run: make debug-cross TARGET=${{ matrix.platform.target }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7ba5cbfd..3242aa0c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,6 +4,7 @@ on: branches: ["master"] paths: - 'utils/**' + - 'plugins/**' pull_request: branches: ["master"] jobs: diff --git a/Makefile b/Makefile index fda01a2b..d3bab395 100644 --- a/Makefile +++ b/Makefile @@ -19,9 +19,11 @@ book: serve-book: cd book && $(MAKE) serve -.PHONY: plugins release release-cross +.PHONY: plugins debug-cross release release-cross plugins: cd plugins && $(MAKE) plugins +debug-cross: + cd bins && $(MAKE) debug-cross TARGET=$(TARGET) release: cd bins && $(MAKE) release release-cross: diff --git a/bins/Makefile b/bins/Makefile index df007f12..b1876618 100644 --- a/bins/Makefile +++ b/bins/Makefile @@ -5,9 +5,11 @@ clean: update: cargo update -.PHONY: dist release release-cross +.PHONY: dist debug-cross release release-cross dist: cd ayaka-gui && $(MAKE) dist +debug-cross: dist + STATIC_VCRUNTIME=false PKG_CONFIG_ALLOW_CROSS=1 cargo build --target=$(TARGET) release: dist STATIC_VCRUNTIME=false cargo build --release release-cross: dist From aec97c31a367729e44668a151adadecea03a4274 Mon Sep 17 00:00:00 2001 From: Yuyi Wang Date: Thu, 5 Jan 2023 00:08:43 +0800 Subject: [PATCH 2/2] Remove postfix prop in debug workflow. --- .github/workflows/debug.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml index 13e33671..6b5a967e 100644 --- a/.github/workflows/debug.yml +++ b/.github/workflows/debug.yml @@ -13,23 +13,18 @@ jobs: - name: linux-x64 os: ubuntu-latest target: x86_64-unknown-linux-gnu - postfix: - name: windows-x64 os: windows-latest target: x86_64-pc-windows-msvc - postfix: .exe - name: windows-arm64 os: windows-latest target: aarch64-pc-windows-msvc - postfix: .exe - name: macos-x64 os: macos-latest target: x86_64-apple-darwin - postfix: - name: macos-arm64 os: macos-latest target: aarch64-apple-darwin - postfix: runs-on: ${{ matrix.platform.os }} steps: - uses: actions/checkout@v2