Update dependencies and remove outdated documentation #18
Workflow file for this run
This file contains hidden or 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
| name: Build (PR Check) | |
| on: | |
| pull_request: | |
| branches: [main, master, develop] | |
| push: | |
| branches: [main, master, develop] | |
| tags-ignore: | |
| - 'v*' | |
| # Control de concurrencia para PRs | |
| # Solo cancela builds anteriores del mismo branch/PR, pero permite builds del mismo commit | |
| concurrency: | |
| group: build-${{ github.ref }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| build-check: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| - os: ubuntu-22.04 | |
| target: x86_64-unknown-linux-gnu | |
| - os: macos-latest | |
| target: x86_64-apple-darwin | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Validate version consistency | |
| shell: bash | |
| run: | | |
| CARGO_VERSION=$(grep -E '^version\s*=' src-tauri/Cargo.toml | head -1 | sed -E 's/.*"([^"]+)".*/\1/' | tr -d ' ') | |
| PACKAGE_VERSION=$(grep -E '"version"' package.json | head -1 | sed -E 's/.*"([^"]+)".*/\1/' | tr -d ' ') | |
| echo "Cargo.toml version: $CARGO_VERSION" | |
| echo "package.json version: $PACKAGE_VERSION" | |
| if [ "$CARGO_VERSION" != "$PACKAGE_VERSION" ]; then | |
| echo "❌ ERROR: Version mismatch!" | |
| echo " Cargo.toml: $CARGO_VERSION" | |
| echo " package.json: $PACKAGE_VERSION" | |
| exit 1 | |
| fi | |
| echo "✅ Versions match: $CARGO_VERSION" | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| run_install: false | |
| - name: Get pnpm store directory | |
| id: pnpm-cache | |
| shell: bash | |
| run: | | |
| echo "path=$(pnpm store path --silent)" >> $GITHUB_OUTPUT | |
| - name: Setup pnpm cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.pnpm-cache.outputs.path }} | |
| key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm- | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| # Cache de Cargo también en PRs | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| src-tauri/target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Install dependencies (Ubuntu) | |
| if: matrix.os == 'ubuntu-22.04' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libwebkit2gtk-4.1-dev \ | |
| libappindicator3-dev \ | |
| librsvg2-dev \ | |
| libsoup2.4-dev \ | |
| pkg-config \ | |
| patchelf | |
| - name: Verify Tauri icons exist | |
| shell: bash | |
| run: | | |
| if [ "${{ matrix.os }}" == "windows-latest" ]; then | |
| if [ ! -f "src-tauri/icons/icon.ico" ]; then | |
| echo "ERROR: icon.ico not found at src-tauri/icons/icon.ico" | |
| ls -la src-tauri/icons/ || echo "icons directory does not exist" | |
| exit 1 | |
| fi | |
| echo "✓ icon.ico found" | |
| elif [ "${{ matrix.os }}" == "ubuntu-22.04" ]; then | |
| if [ ! -f "src-tauri/icons/icon.png" ]; then | |
| echo "ERROR: icon.png not found at src-tauri/icons/icon.png" | |
| ls -la src-tauri/icons/ || echo "icons directory does not exist" | |
| exit 1 | |
| fi | |
| echo "✓ icon.png found" | |
| elif [ "${{ matrix.os }}" == "macos-latest" ]; then | |
| if [ ! -f "src-tauri/icons/icon.icns" ]; then | |
| echo "ERROR: icon.icns not found at src-tauri/icons/icon.icns" | |
| ls -la src-tauri/icons/ || echo "icons directory does not exist" | |
| exit 1 | |
| fi | |
| echo "✓ icon.icns found" | |
| fi | |
| - name: Install frontend dependencies | |
| run: pnpm install | |
| - name: Build frontend | |
| run: pnpm build | |
| continue-on-error: true | |
| id: build_frontend | |
| - name: Build Tauri app (check only) | |
| id: build_tauri | |
| uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| projectPath: . | |
| args: --target ${{ matrix.target }} | |
| continue-on-error: true | |
| - name: Verify binaries exist | |
| if: always() | |
| shell: bash | |
| run: | | |
| if [ "${{ steps.build_tauri.outcome }}" != "success" ]; then | |
| echo "⚠️ Build failed, skipping binary verification" | |
| exit 0 | |
| fi | |
| if [ "${{ matrix.os }}" == "windows-latest" ]; then | |
| if [ -f "src-tauri/target/${{ matrix.target }}/release/meacode-studio.exe" ]; then | |
| echo "✅ Binary found: meacode-studio.exe" | |
| ls -lh "src-tauri/target/${{ matrix.target }}/release/meacode-studio.exe" | |
| else | |
| echo "❌ ERROR: Binary not found!" | |
| find src-tauri/target/${{ matrix.target }}/release -name "*.exe" -o -name "*.msi" -o -name "*.nsis.zip" || true | |
| exit 1 | |
| fi | |
| elif [ "${{ matrix.os }}" == "ubuntu-22.04" ]; then | |
| if [ -f "src-tauri/target/${{ matrix.target }}/release/meacode-studio" ]; then | |
| echo "✅ Binary found: meacode-studio" | |
| ls -lh "src-tauri/target/${{ matrix.target }}/release/meacode-studio" | |
| else | |
| echo "❌ ERROR: Binary not found!" | |
| find src-tauri/target/${{ matrix.target }}/release -name "meacode-studio" -o -name "*.AppImage" -o -name "*.deb" || true | |
| exit 1 | |
| fi | |
| elif [ "${{ matrix.os }}" == "macos-latest" ]; then | |
| if [ -d "src-tauri/target/${{ matrix.target }}/release/bundle/macos/MeaCode Studio.app" ]; then | |
| echo "✅ Binary found: MeaCode Studio.app" | |
| ls -lh "src-tauri/target/${{ matrix.target }}/release/bundle/macos/MeaCode Studio.app" | |
| else | |
| echo "❌ ERROR: Binary not found!" | |
| find src-tauri/target/${{ matrix.target }}/release/bundle -name "*.app" -o -name "*.dmg" || true | |
| exit 1 | |
| fi | |
| fi | |
| - name: Upload build logs on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-logs-${{ matrix.os }}-${{ matrix.target }} | |
| path: | | |
| src-tauri/target/**/*.log | |
| src-tauri/target/**/build.log | |
| retention-days: 7 | |
| if-no-files-found: ignore |