Prevent build artifacts from being cached #13
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: Electron CI - ARM64 | |
| on: | |
| push: | |
| branches: [ master, main ] | |
| pull_request: | |
| jobs: | |
| build-arm64: | |
| name: Build and Test with Electron 39.2.7 - Linux ARM64 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Build and Test Electron on ARM64 | |
| uses: uraimo/run-on-arch-action@v2 | |
| with: | |
| arch: aarch64 | |
| distro: ubuntu22.04 | |
| # Docker options to improve QEMU compatibility | |
| dockerRunArgs: | | |
| --platform linux/arm64/v8 | |
| # Install dependencies in the container | |
| install: | | |
| apt-get update -q -y | |
| apt-get install -q -y ca-certificates curl gnupg build-essential python3 git \ | |
| libglib2.0-0 libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 \ | |
| libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 \ | |
| libcairo2 libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 \ | |
| libgtk-3-0 libasound2 libatspi2.0-0 libdbus-1-3 | |
| # Install Node.js 20 (for Electron build) | |
| mkdir -p /etc/apt/keyrings | |
| curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg | |
| echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list | |
| apt-get update -q -y | |
| apt-get install -q -y nodejs | |
| node --version | |
| npm --version | |
| # Run build and tests | |
| run: | | |
| echo "Running on ARM64 architecture" | |
| node --version | |
| npm --version | |
| # Set environment variables to help with QEMU/node-gyp compatibility | |
| export npm_config_jobs=1 | |
| export JOBS=1 | |
| echo "Installing dependencies..." | |
| npm install | |
| echo "Installing Electron rebuild tools..." | |
| npm install --save-dev @electron/rebuild [email protected] | |
| echo "Rebuilding for Electron..." | |
| npx @electron/rebuild --version 39.2.7 | |
| echo "Running tests with Electron (as Node)..." | |
| ELECTRON_RUN_AS_NODE=1 npx electron node_modules/.bin/mocha test/**/*.test.js --timeout 10000 | |
| echo "Verifying native module..." | |
| if [ -f "build/Release/sqlanywhere.node" ]; then | |
| echo "✓ Native module built successfully" | |
| ls -lh build/Release/sqlanywhere.node | |
| file build/Release/sqlanywhere.node || true | |
| else | |
| echo "✗ Native module NOT found" | |
| exit 1 | |
| fi | |
| echo "Testing Electron module loading..." | |
| ELECTRON_RUN_AS_NODE=1 npx electron --version | |
| ELECTRON_RUN_AS_NODE=1 npx electron test/electron-load-test.js |