-
Notifications
You must be signed in to change notification settings - Fork 46
106 lines (98 loc) · 2.83 KB
/
Copy pathc.yml
File metadata and controls
106 lines (98 loc) · 2.83 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
name: C CI
on:
push:
branches: [trunk]
pull_request:
branches: [trunk]
jobs:
check-on-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: install prerequisites
run: |
sudo apt-get update
sudo apt-get install asciidoc gettext libncurses-dev
- name: configure
run: ./configure
- name: make distcheck
run: make -j$(nproc) distcheck
- name: Display test summary on distcheck failure
if: failure()
run: |
if [ -f yash-*/tests/summary.log ]; then
echo "=== Test Summary ==="
cat yash-*/tests/summary.log
fi
- name: make check as root
run: sudo make -j$(nproc) check
- name: Display test summary on check failure
if: failure()
run: |
if [ -f tests/summary.log ]; then
echo "=== Test Summary ==="
cat tests/summary.log
fi
- name: Upload test logs
if: always()
uses: actions/upload-artifact@v7
with:
name: test-logs-ubuntu
path: |
tests/summary.log
yash-*/tests/summary.log
if-no-files-found: ignore
check-on-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v7
- name: install prerequisites
run: brew install asciidoc gettext ncurses
- name: configure
run: ./configure CADDS="-I$(brew --prefix gettext)/include" LDADDS="-L$(brew --prefix gettext)/lib"
- name: make check
run: make -j$(sysctl -n hw.logicalcpu) check
- name: Display test summary on failure
if: failure()
run: |
if [ -f tests/summary.log ]; then
echo "=== Test Summary ==="
cat tests/summary.log
fi
- name: Upload test logs
if: always()
uses: actions/upload-artifact@v7
with:
name: test-logs-macos
path: tests/summary.log
if-no-files-found: ignore
check-cross-compile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: install cross compilation environment
uses: cyberjunk/gha-ubuntu-cross@v5
with:
arch: arm64
- name: install prerequisites
run: |
sudo apt-get install asciidoc gettext libncurses-dev:arm64
- name: create distdir
run: |
./configure
make dist-zstd
tar -x --zstd -f yash-?*.tar.zst
- name: configure for cross compilation to arm64
run: |
cd yash-?*/
./configure --host=aarch64-linux-gnu CADDS="-I/usr/include/aarch64-linux-gnu" LDADDS="-L/usr/lib/aarch64-linux-gnu" || cat config.log
- name: make for arm64
run: |
cd yash-?*/
make -j$(nproc) yash
summarize:
runs-on: ubuntu-latest
needs: [check-on-ubuntu, check-on-macos, check-cross-compile]
if: ${{ always() }}
steps:
- uses: Kesin11/actions-timeline@v3