From 1e633b0e8bd8e55c03f0dfca68e34fe5d86bedfd Mon Sep 17 00:00:00 2001 From: TheWhiteDog9487 Date: Sat, 8 Aug 2026 11:00:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DARM64=E4=B8=8B=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=BF=90=E8=A1=8CAction=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 22 ++++++++++++---------- .gitignore | 12 ++---------- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ba81a6e..2d01fd3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,11 +1,11 @@ name: 构建二进制可执行文件 on: + workflow_dispatch: pull_request: paths: - "language.cs" # 只在源代码被更新时运行 - workflow_dispatch: push: paths: - "language.cs" @@ -13,8 +13,8 @@ jobs: build: runs-on: ${{ matrix.runner }} - container: alpine:latest strategy: + fail-fast: false matrix: include: - runner: ubuntu-latest @@ -23,18 +23,20 @@ jobs: artifact: language_arm steps: - uses: actions/checkout@v7 - - name: 安装依赖项 - run: | - apk update - apk add build-base dotnet10-sdk clang - name: 编译 - run: - dotnet publish language.cs + run: | + docker run --rm \ + -v "${{ github.workspace }}":/src \ + -w /src \ + alpine:latest /bin/sh -c ' + apk update + apk add build-base dotnet10-sdk clang + dotnet publish language.cs ' - name: 重命名 if: ${{ matrix.runner == 'ubuntu-26.04-arm' }} - run: mv artifacts/language/language artifacts/language/language_arm + run: sudo mv artifacts/language/language artifacts/language/language_arm - uses: actions/upload-artifact@v7 with: name: ${{ matrix.artifact }} - path: ${{ matrix.artifact }} \ No newline at end of file + path: artifacts/language/${{ matrix.artifact }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index ca3423e..b8395df 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,2 @@ -################################################################################ -# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。 -################################################################################ - -.vs -.vscode -a.out -build -language -language_arm \ No newline at end of file +.vscode +artifacts \ No newline at end of file