name: ci on: # Branches only: a release tag points at a commit CI already checked on # main, and release.yml builds it. push: branches: ['**'] pull_request: jobs: core: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: dart-lang/setup-dart@v1 with: sdk: stable - run: dart pub get working-directory: packages/core - run: dart analyze working-directory: packages/core - run: dart test working-directory: packages/core server: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: dart-lang/setup-dart@v1 with: sdk: stable - run: dart pub get working-directory: packages/server - run: dart analyze working-directory: packages/server - run: dart test working-directory: packages/server # Compiling the dedicated server proves it stays Flutter-free. - run: mkdir -p build && dart compile exe bin/server.dart -o build/starsync-server working-directory: packages/server - run: build/starsync-server --help working-directory: packages/server # The updater's Windows apply path (running exe parked as .old) only # means something on real NTFS, and the close smoke run needs the real # build. Runner notes: see release.yml. updater-windows: # Not for a "Release v…" commit: release.yml builds it on the same # (only) Windows runner, which this job would hold up. if: ${{ !startsWith(github.event.head_commit.message, 'Release v') }} runs-on: windows-latest steps: - name: Checkout shell: powershell run: | git init -q . git remote add origin "$env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY.git" git fetch -q origin "$env:GITHUB_SHA" if ($LASTEXITCODE) { exit 1 } git checkout -q --force FETCH_HEAD - name: Setup Flutter shell: powershell run: powershell -NoProfile -ExecutionPolicy Bypass -File tool/setup_flutter_windows.ps1 - name: Updater tests shell: powershell working-directory: packages/core run: | dart pub get if ($LASTEXITCODE) { exit 1 } dart test test/updater_test.dart # The release build, without publishing: a broken Windows build shows # here, not only on a tag. - name: Windows build shell: powershell run: powershell -NoProfile -ExecutionPolicy Bypass -File tool/package_windows.ps1 # The close smoke run on that build (P32): start, open a short clip in # a player with a video output, close; it must exit within 45 s and # leave no process. A runner that cannot show a window skips with a # warning. Here rather than in a job of its own: one build, one runner. - name: Smoke (start, open, close) shell: powershell timeout-minutes: 3 run: powershell -NoProfile -ExecutionPolicy Bypass -File tool/smoke_windows.ps1 -Limit 45