Restructure CI
This commit is contained in:
parent
3a62af24d1
commit
e6b16ce067
2 changed files with 68 additions and 21 deletions
77
.github/workflows/build.yml
vendored
77
.github/workflows/build.yml
vendored
|
|
@ -1,3 +1,6 @@
|
||||||
|
# What software is installed by default:
|
||||||
|
# https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
|
||||||
|
|
||||||
name: build
|
name: build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
|
@ -9,26 +12,12 @@ defaults:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
main:
|
build-linux:
|
||||||
strategy:
|
runs-on: ubuntu-latest
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest, windows-latest]
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repo
|
- name: Check out repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# https://doc.rust-lang.org/cargo/guide/continuous-integration.html#github-actions
|
|
||||||
- name: Set up rust
|
|
||||||
run: |
|
|
||||||
rustup update stable
|
|
||||||
rustup default stable
|
|
||||||
|
|
||||||
# - name: Set up node
|
|
||||||
# uses: actions/setup-node@v4
|
|
||||||
# with:
|
|
||||||
# cache: pnpm
|
|
||||||
|
|
||||||
- name: Set up pnpm
|
- name: Set up pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4
|
||||||
with:
|
with:
|
||||||
|
|
@ -36,8 +25,7 @@ jobs:
|
||||||
|
|
||||||
# https://github.com/tauri-apps/tauri-action?tab=readme-ov-file#usage
|
# https://github.com/tauri-apps/tauri-action?tab=readme-ov-file#usage
|
||||||
# https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/customizing-github-hosted-runners#installing-software-on-ubuntu-runners
|
# https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/customizing-github-hosted-runners#installing-software-on-ubuntu-runners
|
||||||
- name: Install tauri dependencies (Linux)
|
- name: Install tauri dependencies
|
||||||
if: ${{ runner.os == 'Linux' }}
|
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install libwebkit2gtk-4.1-dev
|
sudo apt install libwebkit2gtk-4.1-dev
|
||||||
|
|
@ -45,12 +33,59 @@ jobs:
|
||||||
- name: Build
|
- name: Build
|
||||||
run: ./build
|
run: ./build
|
||||||
|
|
||||||
- name: Upload binaries
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: binaries-${{ matrix.os }}
|
name: tta-linux
|
||||||
path: |
|
path: |
|
||||||
target/release/tta-cli
|
target/release/tta-cli
|
||||||
target/release/tta-cli.exe
|
|
||||||
target/release/tta-app
|
target/release/tta-app
|
||||||
|
|
||||||
|
build-windows:
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up pnpm
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 10
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: ./build
|
||||||
|
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: tta-windows
|
||||||
|
path: |
|
||||||
|
target/release/tta-cli.exe
|
||||||
target/release/tta-app.exe
|
target/release/tta-app.exe
|
||||||
|
|
||||||
|
# TODO: https://v2.tauri.app/distribute/sign/android/
|
||||||
|
# build-android:
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# steps:
|
||||||
|
# - name: Check out repo
|
||||||
|
# uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# - name: Set up pnpm
|
||||||
|
# uses: pnpm/action-setup@v4
|
||||||
|
# with:
|
||||||
|
# version: 10
|
||||||
|
|
||||||
|
# # https://v2.tauri.app/start/prerequisites/#android
|
||||||
|
# - name: Set up rust
|
||||||
|
# run: rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
|
||||||
|
|
||||||
|
# - name: Build
|
||||||
|
# run: |
|
||||||
|
# export NDK_HOME="$ANDROID_NDK_HOME"
|
||||||
|
# ./build_android
|
||||||
|
|
||||||
|
# - name: Upload
|
||||||
|
# uses: actions/upload-artifact@v4
|
||||||
|
# with:
|
||||||
|
# name: tta-android
|
||||||
|
# path: target/release/tta-app.apk
|
||||||
|
|
|
||||||
12
build_android
Executable file
12
build_android
Executable file
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
pushd tta-app
|
||||||
|
pnpm install --frozen-lockfile
|
||||||
|
pnpm tauri android build --apk
|
||||||
|
popd
|
||||||
|
|
||||||
|
mkdir -p target/release/
|
||||||
|
mv tta-app/src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release-unsigned.apk target/release/tta-app.apk
|
||||||
|
|
||||||
|
echo "tta-app.apk can be found at target/release/tta-app.apk"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue