-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Luis Garcia <[email protected]>
- Loading branch information
Showing
1 changed file
with
10 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,20 +98,20 @@ jobs: | |
name: tanoshi-web | ||
path: crates/tanoshi-web/dist | ||
|
||
build-tauri-multiplat: | ||
build-tauri: | ||
runs-on: ${{ matrix.os }} | ||
needs: | ||
- build-web | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
arch: amd64 | ||
- os: [self-hosted, arm64] | ||
arch: aarch64 | ||
container: | ||
image: ghcr.io/luigi311/tanoshi-builder:sha-6b8a514-slim | ||
- os: ubuntu-latest | ||
arch: amd64 | ||
- os: windows-latest | ||
arch: amd64 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
|
@@ -120,61 +120,11 @@ jobs: | |
with: | ||
name: tanoshi-web | ||
path: crates/tanoshi-web/dist | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Build tauri | ||
env: | ||
RUSTFLAGS: "-Clink-arg=-Wl,--allow-multiple-definition" | ||
run: | | ||
cd crates/tanoshi-tauri | ||
cargo tauri build | ||
|
||
- name: Move files | ||
run: | | ||
mkdir -p builds | ||
find target/release/bundle/ -type f \( -name "*.deb" -o -name "*.AppImage" \) -print0 | | ||
while IFS= read -r -d '' file; do | ||
mv "$file" ${{ github.workspace }}/builds/ | ||
done | ||
- name: Install deps (ubuntu) | ||
if: ${{ matrix.os != 'macos-latest' && matrix.os != 'windows-latest' }} | ||
run: sudo apt update && sudo apt upgrade -y && sudo apt install -y ${{ env.UBUNTU_DEPS }} | ||
|
||
- name: Upload dist | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: tanoshi-app-linux-${{ matrix.arch }} | ||
path: ${{ github.workspace }}/builds/ | ||
|
||
- name: Upload binaries to GitHub Releases | ||
if: startsWith(github.ref, 'refs/tags/') | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: ${{ github.workspace }}/builds/* | ||
tag: ${{ github.ref }} | ||
file_glob: true | ||
overwrite: true | ||
|
||
build-tauri: | ||
runs-on: ${{ matrix.os }} | ||
needs: | ||
- build-web | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
#- ubuntu-latest | ||
#- macos-latest | ||
- windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Download dist | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: tanoshi-web | ||
path: crates/tanoshi-web/dist | ||
|
||
- name: Install deps (macOS) | ||
if: ${{ matrix.os == 'macos-latest' }} | ||
run: brew install icu4c libarchive bzip2 lz4 zlib expat libiconv | ||
|
@@ -210,7 +160,7 @@ jobs: | |
- name: Install tauri-cli | ||
run: cargo binstall [email protected] --no-confirm --locked | ||
|
||
- name: Build tanoshi (ubuntu) | ||
- name: Build tauri (ubuntu) | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
env: | ||
RUSTFLAGS: "-Clink-arg=-Wl,--allow-multiple-definition" | ||
|
@@ -250,7 +200,7 @@ jobs: | |
- name: Upload dist | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: tanoshi-app-${{ matrix.os }}-amd64 | ||
name: tanoshi-app-${{ matrix.os }}-${{ matrix.arch }} | ||
path: ${{ github.workspace }}/builds/ | ||
|
||
- name: Upload binaries to GitHub Releases | ||
|
@@ -263,41 +213,6 @@ jobs: | |
file_glob: true | ||
overwrite: true | ||
|
||
build-tanoshi-multiplat: | ||
runs-on: ${{ matrix.os }} | ||
needs: | ||
- build-web | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
arch: amd64 | ||
- os: [self-hosted, arm64] | ||
arch: aarch64 | ||
container: | ||
image: ghcr.io/luigi311/tanoshi-builder:sha-6b8a514-slim | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Download dist | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: tanoshi-web | ||
path: crates/tanoshi-web/dist | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Build tanoshi | ||
env: | ||
RUSTFLAGS: "-Clink-arg=-Wl,--allow-multiple-definition" | ||
run: cargo build -p tanoshi --release | ||
|
||
- name: Upload dist | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: tanoshi-linux-${{ matrix.arch }} | ||
path: ${{ github.workspace }}/target/release/tanoshi | ||
|
||
build-cli: | ||
runs-on: ubuntu-latest | ||
|