|
|
|
|
@@ -19,9 +19,28 @@ env:
|
|
|
|
|
jobs:
|
|
|
|
|
build-linux:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
env:
|
|
|
|
|
PATH: /home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
|
|
|
steps:
|
|
|
|
|
- name: Install Node.js 22
|
|
|
|
|
run: |
|
|
|
|
|
NEED_INSTALL=false
|
|
|
|
|
if command -v node >/dev/null 2>&1; then
|
|
|
|
|
NODE_MAJOR=$(node --version | sed 's/v\([0-9]*\).*/\1/')
|
|
|
|
|
echo "Found Node.js $(node --version) (major: ${NODE_MAJOR})"
|
|
|
|
|
if [ "$NODE_MAJOR" -lt 22 ]; then
|
|
|
|
|
echo "Node.js ${NODE_MAJOR} is too old, upgrading to 22..."
|
|
|
|
|
NEED_INSTALL=true
|
|
|
|
|
fi
|
|
|
|
|
else
|
|
|
|
|
echo "Node.js not found, installing 22..."
|
|
|
|
|
NEED_INSTALL=true
|
|
|
|
|
fi
|
|
|
|
|
if [ "$NEED_INSTALL" = true ]; then
|
|
|
|
|
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
|
|
|
|
|
sudo apt-get install -y nodejs
|
|
|
|
|
fi
|
|
|
|
|
node --version
|
|
|
|
|
npm --version
|
|
|
|
|
|
|
|
|
|
- name: Checkout
|
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
with:
|
|
|
|
|
@@ -71,33 +90,27 @@ jobs:
|
|
|
|
|
else
|
|
|
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
|
|
|
|
fi
|
|
|
|
|
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
|
|
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
|
|
|
|
rustc --version
|
|
|
|
|
cargo --version
|
|
|
|
|
|
|
|
|
|
- name: Install Node.js
|
|
|
|
|
run: |
|
|
|
|
|
if command -v node >/dev/null 2>&1; then
|
|
|
|
|
echo "Node.js already installed: $(node --version)"
|
|
|
|
|
else
|
|
|
|
|
echo "Installing Node.js 22..."
|
|
|
|
|
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
|
|
|
|
|
sudo apt-get install -y nodejs
|
|
|
|
|
fi
|
|
|
|
|
node --version
|
|
|
|
|
npm --version
|
|
|
|
|
|
|
|
|
|
- name: Install frontend dependencies
|
|
|
|
|
working-directory: ./app
|
|
|
|
|
run: npm ci
|
|
|
|
|
run: |
|
|
|
|
|
rm -rf node_modules
|
|
|
|
|
npm install
|
|
|
|
|
|
|
|
|
|
- name: Install Tauri CLI
|
|
|
|
|
working-directory: ./app
|
|
|
|
|
run: npx tauri --version || npm install @tauri-apps/cli
|
|
|
|
|
run: |
|
|
|
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
|
|
|
|
npx tauri --version || npm install @tauri-apps/cli
|
|
|
|
|
|
|
|
|
|
- name: Build Tauri app
|
|
|
|
|
working-directory: ./app
|
|
|
|
|
run: npx tauri build
|
|
|
|
|
run: |
|
|
|
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
|
|
|
|
npx tauri build
|
|
|
|
|
|
|
|
|
|
- name: Collect artifacts
|
|
|
|
|
run: |
|
|
|
|
|
@@ -136,12 +149,21 @@ jobs:
|
|
|
|
|
build-macos:
|
|
|
|
|
runs-on: macos-latest
|
|
|
|
|
steps:
|
|
|
|
|
- name: Install Node.js
|
|
|
|
|
- name: Install Node.js 22
|
|
|
|
|
run: |
|
|
|
|
|
if command -v node &>/dev/null; then
|
|
|
|
|
echo "Node.js already installed: $(node --version)"
|
|
|
|
|
NEED_INSTALL=false
|
|
|
|
|
if command -v node >/dev/null 2>&1; then
|
|
|
|
|
NODE_MAJOR=$(node --version | sed 's/v\([0-9]*\).*/\1/')
|
|
|
|
|
echo "Found Node.js $(node --version) (major: ${NODE_MAJOR})"
|
|
|
|
|
if [ "$NODE_MAJOR" -lt 22 ]; then
|
|
|
|
|
echo "Node.js ${NODE_MAJOR} is too old, upgrading to 22..."
|
|
|
|
|
NEED_INSTALL=true
|
|
|
|
|
fi
|
|
|
|
|
else
|
|
|
|
|
echo "Installing Node.js 22 via Homebrew..."
|
|
|
|
|
echo "Node.js not found, installing 22..."
|
|
|
|
|
NEED_INSTALL=true
|
|
|
|
|
fi
|
|
|
|
|
if [ "$NEED_INSTALL" = true ]; then
|
|
|
|
|
brew install node@22
|
|
|
|
|
brew link --overwrite node@22
|
|
|
|
|
fi
|
|
|
|
|
@@ -178,22 +200,28 @@ jobs:
|
|
|
|
|
else
|
|
|
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
|
|
|
|
fi
|
|
|
|
|
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
|
|
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
|
|
|
|
rustup target add aarch64-apple-darwin x86_64-apple-darwin
|
|
|
|
|
rustc --version
|
|
|
|
|
cargo --version
|
|
|
|
|
|
|
|
|
|
- name: Install frontend dependencies
|
|
|
|
|
working-directory: ./app
|
|
|
|
|
run: npm ci
|
|
|
|
|
run: |
|
|
|
|
|
rm -rf node_modules
|
|
|
|
|
npm install
|
|
|
|
|
|
|
|
|
|
- name: Install Tauri CLI
|
|
|
|
|
working-directory: ./app
|
|
|
|
|
run: npx tauri --version || npm install @tauri-apps/cli
|
|
|
|
|
run: |
|
|
|
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
|
|
|
|
npx tauri --version || npm install @tauri-apps/cli
|
|
|
|
|
|
|
|
|
|
- name: Build Tauri app (universal)
|
|
|
|
|
working-directory: ./app
|
|
|
|
|
run: npx tauri build --target universal-apple-darwin
|
|
|
|
|
run: |
|
|
|
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
|
|
|
|
npx tauri build --target universal-apple-darwin
|
|
|
|
|
|
|
|
|
|
- name: Collect artifacts
|
|
|
|
|
run: |
|
|
|
|
|
|