Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoshinonyaruko committed Nov 5, 2023
1 parent 76363a6 commit d8b05cd
Showing 1 changed file with 30 additions and 45 deletions.
75 changes: 30 additions & 45 deletions .github/workflows/cross_compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,49 +8,7 @@ on:
- '*'

jobs:
build_frontend:
runs-on: ubuntu-latest
outputs:
cache-key: ${{ steps.cache-frontend.outputs.cache-hit }}
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '19'

- name: Cache Node modules
id: cache-frontend
uses: actions/cache@v2
with:
path: |
frontend/node_modules
~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Quasar CLI and dependencies
if: steps.cache-frontend.outputs.cache-hit != 'true'
run: |
cd frontend
npm install -g @quasar/cli
npm install
- name: Build Quasar Project
run: |
cd frontend
quasar build
- name: Upload frontend artifact
uses: actions/upload-artifact@v2
with:
name: frontend-build
path: frontend/dist
build_go:
needs: build_frontend
build:
name: Build on ${{ matrix.os }} for ${{ matrix.goarch }}
runs-on: ubuntu-latest
strategy:
Expand All @@ -74,6 +32,7 @@ jobs:
goarch: 386
- os: android
goarch: arm64
# ... Add other combinations as needed

steps:
- name: Checkout code
Expand All @@ -84,6 +43,32 @@ jobs:
with:
go-version: '1.21.1' # Set to specific Go version.

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '19'

- name: Cache Node modules
uses: actions/cache@v2
with:
path: |
frontend/node_modules
~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Quasar CLI and dependencies
run: |
cd frontend
npm install -g @quasar/cli
npm install
- name: Build Quasar Project
run: |
cd frontend
quasar build
- name: Setup Android NDK (only for Android builds)
if: matrix.os == 'android'
run: |
Expand Down Expand Up @@ -111,7 +96,7 @@ jobs:
path: output/gensokyo-${{ matrix.os }}-${{ matrix.goarch }}

prepare_release:
needs: build_go
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
Expand Down Expand Up @@ -140,4 +125,4 @@ jobs:
-H "Content-Type: multipart/form-data" \
-F "file=@${asset_path}" \
"${{ steps.create_release.outputs.upload_url }}=${asset_name}&label=${asset_name}"
done
done

0 comments on commit d8b05cd

Please sign in to comment.