Snap #515
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
| on: | |
| workflow_dispatch: | |
| inputs: | |
| source-run-id: | |
| description: run id of the workflow that generated the artifact | |
| required: true | |
| type: string | |
| source-artifact-id: | |
| description: source tarball built during build-dist | |
| required: true | |
| type: string | |
| name: Snap | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| [namespace-profile-ghostty-snap, namespace-profile-ghostty-snap-arm64] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 45 | |
| env: | |
| ZIG_LOCAL_CACHE_DIR: /zig/local-cache | |
| ZIG_GLOBAL_CACHE_DIR: /zig/global-cache | |
| steps: | |
| - name: Download Source Tarball Artifacts | |
| uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| run-id: ${{ inputs.source-run-id }} | |
| artifact-ids: ${{ inputs.source-artifact-id }} | |
| github-token: ${{ github.token }} | |
| - name: Extract tarball | |
| run: | | |
| mkdir dist | |
| tar --verbose --extract --strip-components 1 --directory dist --file ghostty-source.tar.gz | |
| - name: Setup Cache | |
| uses: namespacelabs/nscloud-cache-action@446d8f390563cd54ca27e8de5bdb816f63c0b706 # v1.2.21 | |
| with: | |
| path: | | |
| /nix | |
| /zig | |
| - run: sudo apt install -y udev | |
| - run: sudo systemctl start systemd-udevd | |
| # Workaround until this is fixed: https://github.com/canonical/lxd-pkg-snap/pull/789 | |
| - run: | | |
| _LXD_SNAP_DEVCGROUP_CONFIG="/var/lib/snapd/cgroup/snap.lxd.device" | |
| sudo mkdir -p /var/lib/snapd/cgroup | |
| echo 'self-managed=true' | sudo tee "${_LXD_SNAP_DEVCGROUP_CONFIG}" | |
| - uses: snapcore/action-build@3bdaa03e1ba6bf59a65f84a751d943d549a54e79 # v1.3.0 | |
| with: | |
| path: dist |