From 8d1586f51fb1ecbafcd0ec1d9ec3c22a71ea3132 Mon Sep 17 00:00:00 2001 From: SanaeFox <36219542+Hoshinonyaruko@users.noreply.github.com> Date: Fri, 29 Mar 2024 18:23:37 +0800 Subject: [PATCH] Update cross_compile.yml --- .github/workflows/cross_compile.yml | 52 +---------------------------- 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/.github/workflows/cross_compile.yml b/.github/workflows/cross_compile.yml index ef657d3..5510f17 100644 --- a/.github/workflows/cross_compile.yml +++ b/.github/workflows/cross_compile.yml @@ -62,56 +62,6 @@ jobs: else upx --best --lzma "$FILENAME" fi - shell: bash - - - name: Upload artifacts - uses: actions/upload-artifact@v2 - with: - name: gensokyo-hunyuan-${{ matrix.os }}-${{ matrix.goarch }} - path: output/gensokyo-hunyuan-${{ matrix.os }}-${{ matrix.goarch }}${{ endsWith(matrix.os, 'windows') && '.exe' || '' }} - build-win: - name: Build on ${{ matrix.os }} for ${{ matrix.goarch }} - runs-on: windows-latest - strategy: - matrix: - include: - - os: windows - goarch: amd64 - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: '1.21.1' # Set to specific Go version. - - - name: Install build dependencies (Windows) - if: matrix.os == 'windows' - run: | - choco install msys2 --params "/NoUpdate /InstallDir:C:\msys64" --no-progress -y - C:\msys64\usr\bin\bash -lc "pacman -Syu --noconfirm" - C:\msys64\usr\bin\bash -lc "pacman -S --noconfirm mingw-w64-x86_64-gcc mingw64/mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake mingw-w64-x86_64-extra-cmake-modules mingw-w64-x86_64-toolchain" - echo "CGO_ENABLED=1" >> $GITHUB_ENV - echo "CC=x86_64-w64-mingw32-gcc" >> $GITHUB_ENV - echo "CXX=x86_64-w64-mingw32-g++" >> $GITHUB_ENV - - - name: Create output directory - run: mkdir -p output - - - name: Compile Go for target - env: - GOOS: ${{ matrix.os }} - GOARCH: ${{ matrix.goarch }} - CGO_ENABLED: 1 - run: | - if [ "$GOOS" = "windows" ]; then - go build -o output/gensokyo-hunyuan-${{ matrix.os }}-${{ matrix.goarch }}.exe - else - go build -o output/gensokyo-hunyuan-${{ matrix.os }}-${{ matrix.goarch }} - fi - shell: bash - name: Upload artifacts uses: actions/upload-artifact@v2 @@ -237,4 +187,4 @@ jobs: else echo "Expected ${dir} to be a directory." fi - done \ No newline at end of file + done