ci: stop advertising x86_64-darwin, which Nixpkgs 26.11 dropped #243
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: native terminal contract | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| native-terminfo: | |
| name: native terminfo (${{ matrix.label }}) | |
| if: github.event_name != 'schedule' | |
| runs-on: ${{ matrix.runner }} | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - runner: ubuntu-24.04 | |
| label: linux | |
| - runner: macos-latest | |
| label: macos-system | |
| - runner: macos-latest | |
| label: macos-homebrew | |
| steps: | |
| - &checkout | |
| name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Install Linux terminfo tools | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update && sudo apt-get install -y libncurses-dev ncurses-bin pkg-config | |
| - name: Select Apple ncurses | |
| if: matrix.label == 'macos-system' | |
| run: | | |
| echo "NCURSES_NO_PKG_CONFIG=1" >> "$GITHUB_ENV" | |
| echo "NCURSESW_NO_PKG_CONFIG=1" >> "$GITHUB_ENV" | |
| echo "/usr/bin" >> "$GITHUB_PATH" | |
| - name: Select Homebrew ncurses | |
| if: matrix.label == 'macos-homebrew' | |
| run: | | |
| brew install ncurses pkg-config | |
| echo "PKG_CONFIG_PATH=$(brew --prefix ncurses)/lib/pkgconfig" >> "$GITHUB_ENV" | |
| echo "$(brew --prefix ncurses)/bin" >> "$GITHUB_PATH" | |
| - name: Set up Rust tooling | |
| uses: ./.github/actions/setup-rust | |
| with: | |
| cache-key: ci-terminfo-${{ matrix.label }} | |
| cache-save-if: ${{ github.ref == 'refs/heads/main' }} | |
| install-nextest: "true" | |
| - name: Probe Apple padding ABI independently | |
| if: matrix.label == 'macos-system' | |
| run: python3 crates/neomacs-terminfo/tests/padding_probe.py | |
| - name: Compare native expansion and test snapshots | |
| run: cargo nextest run -p neomacs-terminfo --locked | |
| native-terminal-output: | |
| name: native terminal output (${{ matrix.label }}) | |
| if: github.event_name != 'schedule' | |
| runs-on: ${{ matrix.runner }} | |
| timeout-minutes: 60 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - runner: macos-latest | |
| label: macos-aarch64 | |
| - runner: windows-latest | |
| label: windows-msvc-x86_64 | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| steps: | |
| - *checkout | |
| - name: Select Apple ncurses | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew install pkg-config | |
| echo "NCURSES_NO_PKG_CONFIG=1" >> "$GITHUB_ENV" | |
| echo "NCURSESW_NO_PKG_CONFIG=1" >> "$GITHUB_ENV" | |
| echo "/usr/bin" >> "$GITHUB_PATH" | |
| - name: Set up Rust tooling | |
| uses: ./.github/actions/setup-rust | |
| with: | |
| cache-key: ci-terminal-output-${{ matrix.label }} | |
| cache-save-if: ${{ github.ref == 'refs/heads/main' }} | |
| install-nextest: "true" | |
| - name: Test macOS terminal output and capability policy | |
| if: runner.os == 'macOS' | |
| run: >- | |
| cargo nextest run -p neomacs --lib --locked | |
| --no-default-features --features neo-term | |
| -E 'test(tty_output::) | test(tty_init::) | test(terminal_capabilities::) | test(secondary_tty::)' | |
| - name: Test Windows terminal output in an owned console | |
| if: runner.os == 'Windows' | |
| shell: python | |
| run: | | |
| import subprocess | |
| import sys | |
| sys.stdout.reconfigure(encoding="utf-8", errors="replace") | |
| with subprocess.Popen( | |
| ["cargo", "nextest", "run", "-p", "neomacs", "--lib", "--locked", | |
| "--no-default-features", "--features", "neo-term", | |
| "-E", "test(tty_output::windows::tests)", "--run-ignored", "all", | |
| "--test-threads", "1"], | |
| creationflags=subprocess.CREATE_NEW_CONSOLE, | |
| stdout=subprocess.PIPE, | |
| stderr=subprocess.STDOUT, | |
| text=True, | |
| encoding="utf-8", | |
| errors="replace", | |
| ) as process: | |
| for line in process.stdout: | |
| print(line, end="", flush=True) | |
| raise SystemExit(process.wait()) | |
| # Cross-compilation cannot exercise inotify, kqueue, or | |
| # ReadDirectoryChangesW. Keep this independent from the workspace check so | |
| # an unrelated platform-only crate failure cannot skip the native runtime | |
| # contract, and build only neovm-core's library test binary. | |
| native-file-notify: | |
| name: native file notifications (${{ matrix.label }}) | |
| if: ${{ github.event_name != 'schedule' }} | |
| runs-on: ${{ matrix.runner }} | |
| timeout-minutes: 60 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - runner: ubuntu-24.04 | |
| label: linux-x86_64 | |
| - runner: macos-latest | |
| label: macos-aarch64 | |
| - runner: windows-latest | |
| label: windows-msvc-x86_64 | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| steps: | |
| - *checkout | |
| # neovm-core depends on `dbus` for every unix but macOS, and | |
| # `libdbus-sys`'s build script panic!()s when `dbus-1.pc` is missing -- | |
| # it has no HAVE_DBUS=no mode (see release.yml's dbus-devel comment). | |
| # Ubuntu's package is `libdbus-1-dev`. | |
| - name: Install libdbus dev headers | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update && sudo apt-get install -y libdbus-1-dev pkg-config | |
| - name: Set up Rust tooling | |
| uses: ./.github/actions/setup-rust | |
| with: | |
| cache-key: ci-file-notify-${{ matrix.label }} | |
| cache-shared-key: ${{ matrix.label }}-dev | |
| cache-save-if: ${{ github.ref == 'refs/heads/main' }} | |
| install-nextest: "true" | |
| - name: Test native runtime contracts | |
| shell: bash | |
| run: >- | |
| cargo nextest run -p neovm-core --lib | |
| -E 'test(native_runtime_test) | | |
| test(windows_set_file_times_does_not_require_content_write_access) | | |
| test(windows_file_writable_p_accepts_existing_directory_forms) | | |
| test(windows_copy_file_without_keep_time_refreshes_timestamps) | | |
| test(copy_file_keep_time_preserves_source_modification_time) | | |
| test(backup_buffer_uses_rename_when_copying_is_disabled)' | |
| # The native Rust tests above isolate backend/thread/lifecycle failures. A | |
| # release Neomacs is still required to prove the public Lisp API, special | |
| # event dispatch, timers, auto-revert, and backend agree as one system. The | |
| # Linux release runtime is already built below; build only the two other | |
| # native products here instead of paying for a second Linux release link. | |
| file-notify-public-ert: | |
| name: GNU file notification ERT (${{ matrix.label }}) | |
| if: ${{ github.event_name != 'schedule' }} | |
| runs-on: ${{ matrix.runner }} | |
| timeout-minutes: 180 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - runner: macos-latest | |
| label: macos-aarch64 | |
| binary: target/release/neomacs | |
| - runner: windows-latest | |
| label: windows-msvc-x86_64 | |
| binary: target/release/neomacs.exe | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| RUST_LOG: warn | |
| steps: | |
| - *checkout | |
| - uses: ./.github/actions/install-build-deps | |
| - name: Set up Rust tooling | |
| uses: ./.github/actions/setup-rust | |
| with: | |
| cache-key: ci-file-notify-ert-${{ matrix.label }} | |
| cache-shared-key: ${{ matrix.label }}-release | |
| cache-save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Build fresh release runtime | |
| shell: bash | |
| run: cargo xtask fresh-build --release | |
| # loaddefs-gen deliberately warns and continues when loading a source | |
| # file fails, so a successful fresh-build exit status alone cannot catch | |
| # a broken clean-tree bootstrap. Simulate Darwin without the generated | |
| # tramp-loaddefs seed and require Tramp's source-loading guard to work. | |
| - name: Test clean-tree Tramp loaddefs bootstrap | |
| shell: bash | |
| run: >- | |
| "${{ matrix.binary }}" --batch -Q | |
| -L lisp/net | |
| -l test/lisp/net/tramp-bootstrap-tests.el | |
| -f ert-run-tests-batch-and-exit | |
| - name: Run unchanged upstream GNU file-notify ERT suite | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| task_tmp="$PWD/target/file-notify-ert-tmp" | |
| mkdir -p "$task_tmp" | |
| if [ "$RUNNER_OS" = Windows ]; then | |
| task_tmp="$(cygpath -w "$task_tmp")" | |
| export REMOTE_TEMPORARY_FILE_DIRECTORY=NUL | |
| export TEMP="$task_tmp" | |
| export TMP="$task_tmp" | |
| else | |
| export REMOTE_TEMPORARY_FILE_DIRECTORY=/dev/null | |
| fi | |
| export TMPDIR="$task_tmp" | |
| "${{ matrix.binary }}" --batch -Q \ | |
| -l test/lisp/filenotify-tests.el \ | |
| -f ert-run-tests-batch-and-exit |