Skip to content

Commit

Permalink
Beta18 (#18)
Browse files Browse the repository at this point in the history
* beta1

* beta2

* beta3

* beta4

* beta5

* beta6

* beta7

* beta8

* beta9

* beta10

* beta11

* beta12

* beta13

* beta14

* beta15

* beta16

* beta16
  • Loading branch information
Hoshinonyaruko authored Jan 21, 2024
1 parent 3dbfb98 commit 6fbc530
Showing 1 changed file with 82 additions and 8 deletions.
90 changes: 82 additions & 8 deletions .github/workflows/cross_compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- '*'

jobs:
build:
build-ubuntu:
name: Build on ${{ matrix.os }} for ${{ matrix.goarch }}
runs-on: ${{ matrix.os }}-latest
strategy:
Expand All @@ -18,12 +18,53 @@ jobs:
goarch: amd64
- os: linux
goarch: arm64

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 (Ubuntu)
if: matrix.os == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y build-essential libc6-dev libsqlite3-dev
- 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
with:
name: gensokyo-hunyuan-${{ matrix.os }}-${{ matrix.goarch }}
path: output/gensokyo-hunyuan-${{ matrix.os }}-${{ matrix.goarch }}${{ endsWith(matrix.os, 'windows') && '.exe' || '' }}
build-darwin:
name: Build on ${{ matrix.os }} for ${{ matrix.goarch }}
runs-on: darwin-latest
strategy:
matrix:
include:
- os: darwin
goarch: amd64
- os: darwin
goarch: arm64
- os: windows
goarch: amd64

steps:
- name: Checkout code
Expand All @@ -40,11 +81,44 @@ jobs:
brew update
brew install sqlite3
- name: Install build dependencies (Ubuntu)
if: matrix.os == 'linux'
- name: Create output directory
run: mkdir -p output

- name: Compile Go for target
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: 1
run: |
sudo apt-get update
sudo apt-get install -y build-essential libc6-dev libsqlite3-dev
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
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'
Expand Down Expand Up @@ -79,7 +153,7 @@ jobs:
path: output/gensokyo-hunyuan-${{ matrix.os }}-${{ matrix.goarch }}${{ endsWith(matrix.os, 'windows') && '.exe' || '' }}

prepare_release:
needs: build
needs: [build-ubuntu, build-darwin, build-win]
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
Expand Down

0 comments on commit 6fbc530

Please sign in to comment.