-
Notifications
You must be signed in to change notification settings - Fork 2
125 lines (104 loc) · 3.25 KB
/
ci.yaml
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
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
#
# see https://github.com/folke/lazy.nvim/blob/main/.github/workflows/ci.yml
name: CI
on:
pull_request:
push:
branches:
- master
tags:
- '*'
workflow_run:
workflows:
- "Update Types"
types:
- completed
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt,clippy
- name: cargo fmt
uses: actions-rust-lang/rustfmt@v1
with:
manifest-path: packages/binutils/Cargo.toml
- name: cargo clippy
run: "cd packages/binutils && cargo clippy -- -D warnings"
test-nvim:
name: test nvim
runs-on: ubuntu-latest
# installing fzf can take ~1m
# testing binutils can take ~1m
timeout-minutes: 4
steps:
- name: Environment information
run: |
uname
uname -a
- uses: actions/checkout@v4
- name: Install fzf
run: sudo apt-get -y install fzf
- name: Download Neovim
env:
APPIMG_NIGHTLY: https://github.com/neovim/neovim/releases/download/nightly/nvim-linux-x86_64.appimage
run: |
mkdir -p /tmp/nvim
wget -q ${APPIMG_NIGHTLY} -O /tmp/nvim/nvim.appimage
cd /tmp/nvim
chmod a+x ./nvim.appimage
./nvim.appimage --appimage-extract
echo "/tmp/nvim/squashfs-root/usr/bin/" >> $GITHUB_PATH
- name: Install python3
uses: actions/setup-python@v4
env:
DEBUG_SSH: ${{ secrets.DEBUG_SSH }}
if: ${{ env.DEBUG_SSH == 'true' }}
with:
python-version: '3.x'
# architecture: 'x64' #defaults to x64
- name: Install python neovim module
env:
DEBUG_SSH: ${{ secrets.DEBUG_SSH }}
if: ${{ env.DEBUG_SSH == 'true' }}
run: |
pip3 install neovim
- name: Setup upterm session
env:
DEBUG_SSH: ${{ secrets.DEBUG_SSH }}
if: ${{ env.DEBUG_SSH == 'true' }}
uses: lhotari/action-upterm@v1
with:
## limits ssh access and adds the ssh public key for the user which triggered the workflow
# limit-access-to-actor: true
## limits ssh access and adds the ssh public keys of the listed GitHub users
limit-access-to-users: hjdivad,rwjblue
- name: test
env:
DEBUG: ${{ secrets.Debug }}
run: tests/run
test-binutils:
name: test binutils
env:
RUST_LOG: trace
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- name: Environment information
run: |
uname
uname -a
- name: Git Identity Configuration
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
- run: sudo apt-get update && sudo apt-get install -y zsh
- run: cd packages/binutils && cargo nextest run --workspace --no-fail-fast