Skip to content

first party nix (flake) support #181

first party nix (flake) support

first party nix (flake) support #181

Workflow file for this run

name: Build-(Core & Tauri)
on:
push:
branches: [ "master" ]
pull_request:
# cancel ongoing jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
build_core:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
- os: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-directories: "${{ github.workspace }}/core_lib/target"
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
if: contains(matrix.os, 'macos') == false
run: |
sudo apt-get update
sudo apt-get install -y libdbus-1-dev
- run: |
cd ./core_lib
cargo test
cargo build
build_tauri:
runs-on: ${{ matrix.os }}
needs: build_core
strategy:
matrix:
include:
- os: ubuntu-20.04
name: legacy
target_path: app/legacy
dependencies: |
sudo apt-get install -y libjavascriptcoregtk-4.0-dev libwebkit2gtk-4.0-dev
cache_directory: app/legacy/src-tauri/target
- os: ubuntu-24.04
name: main
target_path: app/main
dependencies: |
sudo apt-get install -y libsoup-3.0-dev libjavascriptcoregtk-4.1-dev libwebkit2gtk-4.1-dev
cache_directory: app/main/src-tauri/target
- os: macos-latest
name: main
target_path: app/main
cache_directory: app/main/src-tauri/target
- os: macos-13
name: main
target_path: app/main
cache_directory: app/main/src-tauri/target
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-directories: "${{ github.workspace }}/${{ matrix.cache_directory }}"
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Linux dependencies for U
if: contains(matrix.os, 'macos') == false
run: |
sudo apt-get update
sudo apt-get install -y libdbus-1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
- name: Install Linux dependencies
if: contains(matrix.os, 'macos') == false
run: ${{ matrix.dependencies }}
- name: GLIBC version
if: contains(matrix.os, 'macos') == false
run: |
GLIBC_VER=$(ldd --version | head -n1 | awk '{print $NF}')
echo "GLIBC version: ${GLIBC_VER}"
- name: Build Vite + Tauri
run: |
rm -rf ${{ github.workspace }}/${{ matrix.target_path }}/src-tauri/target/debug/bundle/
cd ./${{ matrix.target_path }}
pnpm install
pnpm build:debug
cd ${{ github.workspace }}
./rename_build.sh ${{ github.workspace }}/${{ matrix.target_path }}/src-tauri/target/debug/bundle/ ${{ matrix.name }}
- name: Upload result
uses: actions/upload-artifact@v4
with:
name: artifact-debug-rquickshare-${{ matrix.os }}
path: |
${{ github.workspace }}/${{ matrix.target_path }}/src-tauri/target/debug/bundle/*/r-quick-share-${{ matrix.name }}*