Skip to content

Commit

Permalink
Merge branch 'main' into beta23
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoshinonyaruko authored Mar 29, 2024
2 parents 2e4f3fa + f652523 commit 2f6409d
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/cross_compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,56 @@ 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
Expand Down
Binary file added pic/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2f6409d

Please sign in to comment.