Nightly Build #109
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: Nightly Build | |
| on: | |
| schedule: | |
| # Run every day at 2 AM UTC | |
| - cron: '0 2 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| nightly-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Emacs | |
| uses: purcell/setup-emacs@master | |
| with: | |
| version: '29.1' | |
| - name: Setup Cask | |
| uses: conao3/setup-cask@master | |
| with: | |
| version: snapshot | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install all dependencies | |
| run: | | |
| cask install | |
| npm ci | |
| - name: Byte compile all files | |
| run: | | |
| cask emacs --batch -f batch-byte-compile *.el | |
| - name: Run all tests | |
| run: | | |
| cask exec ert-runner | |
| continue-on-error: true | |
| - name: Build JavaScript assets | |
| run: npm run build | |
| - name: Test system integration | |
| run: | | |
| cask emacs --batch -L . \ | |
| --eval "(progn \ | |
| (require 'aichat) \ | |
| (require 'skintwin) \ | |
| (message \"Nightly build: System integration OK\"))" | |
| - name: Generate nightly package | |
| run: | | |
| mkdir -p nightly-build | |
| cp *.el nightly-build/ | |
| cp *.org nightly-build/ || true | |
| cp README.md nightly-build/ || true | |
| tar -czf emacs-aichat-skintwin-nightly-$(date +%Y%m%d).tar.gz nightly-build/ | |
| - name: Upload nightly artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nightly-build-${{ github.run_number }}-${{ matrix.emacs-version }}-${{ matrix.os }} | |
| path: | | |
| emacs-aichat-skintwin-nightly-*.tar.gz | |
| dist/ | |
| retention-days: 7 | |
| - name: Check for issues | |
| run: | | |
| echo "# Nightly Build Report" > nightly-report.md | |
| echo "" >> nightly-report.md | |
| echo "## Build Date: $(date)" >> nightly-report.md | |
| echo "" >> nightly-report.md | |
| echo "## Status: ✓ Build Successful" >> nightly-report.md | |
| echo "" >> nightly-report.md | |
| echo "## Included Components:" >> nightly-report.md | |
| echo "- Emacs Lisp modules (byte-compiled)" >> nightly-report.md | |
| echo "- JavaScript assets (bundled)" >> nightly-report.md | |
| echo "- Documentation files" >> nightly-report.md | |
| echo "" >> nightly-report.md | |
| echo "## Test Results:" >> nightly-report.md | |
| echo "- See workflow logs for detailed test results" >> nightly-report.md | |
| - name: Upload nightly report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nightly-report | |
| path: nightly-report.md | |
| retention-days: 30 | |
| nightly-tests: | |
| runs-on: ubuntu-latest | |
| needs: nightly-build | |
| strategy: | |
| matrix: | |
| emacs-version: ['29.1', '28.2', '27.2'] | |
| os: [ubuntu-latest, macos-latest] | |
| fail-fast: false | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Emacs | |
| uses: purcell/setup-emacs@master | |
| with: | |
| version: ${{ matrix.emacs-version }} | |
| - name: Setup Cask | |
| uses: conao3/setup-cask@master | |
| with: | |
| version: snapshot | |
| - name: Install dependencies | |
| run: cask install | |
| - name: Run extended tests | |
| run: | | |
| cask exec ert-runner | |
| continue-on-error: true | |
| - name: Platform-specific tests | |
| run: | | |
| cask emacs --batch -L . \ | |
| --eval "(message \"Platform: ${{ matrix.os }}\")" \ | |
| --eval "(message \"Emacs: ${{ matrix.emacs-version }}\")" \ | |
| --eval "(require 'aichat)" \ | |
| --eval "(require 'skintwin)" | |
| cleanup-old-artifacts: | |
| runs-on: ubuntu-latest | |
| needs: [nightly-build, nightly-tests] | |
| steps: | |
| - name: Cleanup old nightly builds | |
| run: | | |
| echo "Old nightly builds are automatically cleaned up by GitHub Actions" | |
| echo "Retention is set to 7 days for build artifacts" | |
| echo "Retention is set to 30 days for reports" |