-
Notifications
You must be signed in to change notification settings - Fork 1
124 lines (122 loc) · 3.52 KB
/
Copy pathci.yml
File metadata and controls
124 lines (122 loc) · 3.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: "CI"
on:
pull_request:
push:
branches:
- master
permissions:
actions: read
contents: read
pages: write
id-token: write
deployments: write
jobs:
build:
needs:
- nixos
- home-manager
- standalone
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
extra-conf: "experimental-features = nix-command flakes"
- uses: cachix/cachix-action@v16
with:
name: fmcachix
extraPullNames: nix-community
skipPush: true
- name: Build search
run: nix build ./dev#search -L
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy ./result --branch master --project-name=nxchad-options
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
nixos:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
extra-conf: "experimental-features = nix-command flakes"
- uses: cachix/cachix-action@v16
with:
name: fmcachix
extraPullNames: nix-community
skipPush: true
- name: build
run: nix run nixpkgs#nixos-rebuild -- build --flake ./dev#x86_64
# nix-darwin:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v4
# - uses: DeterminateSystems/nix-installer-action@main
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# extra-conf: "experimental-features = nix-command flakes"
# - uses: cachix/cachix-action@v16
# with:
# name: fmcachix
# extraPullNames: nix-community
# skipPush: true
# - name: build
# run: nix run nix-darwin/master#darwin-rebuild -- build --flake ./dev#aarch64
home-manager:
strategy:
matrix:
os:
- ubuntu-latest
# - macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
extra-conf: "experimental-features = nix-command flakes"
- uses: cachix/cachix-action@v16
with:
name: fmcachix
extraPullNames: nix-community
skipPush: true
- name: Build
env:
NAME: ${{ matrix.os == 'ubuntu-latest' && 'x86_64-linux' || 'aarch64-darwin' }}
run: |
nix run github:nix-community/home-manager --override-input nixpkgs nixpkgs -- \
build --flake ./dev#${NAME}
standalone:
strategy:
matrix:
os:
- ubuntu-latest
# - macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
extra-conf: "experimental-features = nix-command flakes"
- uses: cachix/cachix-action@v16
with:
name: fmcachix
extraPullNames: nix-community
skipPush: true
- name: Build
run: |
nix build ./dev
./result/bin/nvim --version
# TODO add to readme
- name: Get StartupTime
run: |
./result/bin/nvim --headless --startuptime /dev/stdout +qall | awk '{$1="" ; print $0}' | grep -E '^ *[0-9]' | sort