mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-11 20:27:39 +00:00
102 lines
3.1 KiB
YAML
102 lines
3.1 KiB
YAML
name: Nix Haskell builds
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [master, stable, build/stable-ghc-9.14]
|
|
paths:
|
|
- 'flake.*'
|
|
- '*.cabal'
|
|
- 'cabal.project*'
|
|
- 'src/**'
|
|
- 'apps/simplex-*/**'
|
|
- 'bots/**'
|
|
- 'scripts/nix/**'
|
|
- 'Makefile'
|
|
- '.github/workflows/nix.yml'
|
|
pull_request:
|
|
paths:
|
|
- 'flake.*'
|
|
- '*.cabal'
|
|
- 'cabal.project*'
|
|
- 'src/**'
|
|
- 'apps/simplex-*/**'
|
|
- 'bots/**'
|
|
- 'scripts/nix/**'
|
|
- 'Makefile'
|
|
- '.github/workflows/nix.yml'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: nix-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
name: ${{ matrix.system }} / pinned Haskell compiler
|
|
runs-on: ${{ matrix.runner }}
|
|
timeout-minutes: 360
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- system: x86_64-linux
|
|
runner: ubuntu-24.04
|
|
- system: aarch64-linux
|
|
runner: ubuntu-24.04-arm
|
|
- system: aarch64-darwin
|
|
runner: macos-15
|
|
- system: x86_64-darwin
|
|
runner: macos-15-intel
|
|
env:
|
|
NIX_SYSTEM: ${{ matrix.system }}
|
|
NIX_BUILD_TIMEOUT: 7200
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- uses: cachix/install-nix-action@v31
|
|
with:
|
|
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
|
extra_nix_config: |
|
|
extra-substituters = https://cache.iog.io https://cache.zw3rk.com
|
|
extra-trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk=
|
|
# The pinned haskell.nix uses this scheduling marker for cross
|
|
# slices that need a real x86_64 host. This runner is native x86_64.
|
|
extra-system-features = ${{ matrix.system == 'x86_64-linux' && 'recursive-nix' || '' }}
|
|
|
|
- name: Show outputs from this checkout
|
|
run: make nix-list
|
|
|
|
# Use the compiler fork in flake.lock, including both Android ABIs.
|
|
# Stock GHC installed by ghcup is not interchangeable with this compiler.
|
|
- name: Build existing Haskell outputs
|
|
run: make nix-build
|
|
|
|
- name: Check native CLI encryption and profile passwords
|
|
run: python3 scripts/nix/smoke-cli.py "result-nix/$NIX_SYSTEM/exe:simplex-chat/bin/simplex-chat"
|
|
|
|
- name: Collect library ZIPs and CLIs
|
|
shell: bash
|
|
run: |
|
|
mkdir -p artifacts
|
|
for output in result-nix/"$NIX_SYSTEM"/*; do
|
|
[ -d "$output" ] || continue
|
|
package_name=$(basename "$output")
|
|
destination="artifacts/${package_name//:/-}"
|
|
mkdir -p "$destination"
|
|
find -L "$output" -maxdepth 1 -type f -name '*.zip' -exec cp {} "$destination/" \;
|
|
if [ -f "$output/bin/simplex-chat" ]; then
|
|
cp "$output/bin/simplex-chat" "$destination/"
|
|
fi
|
|
done
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: nix-${{ matrix.system }}-${{ github.sha }}
|
|
path: artifacts/
|
|
if-no-files-found: error
|