-
Notifications
You must be signed in to change notification settings - Fork 25
157 lines (140 loc) · 5.32 KB
/
check-make-dist.yml
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
name: Weekly Check Dist
on:
schedule:
- cron: '42 5 * * 1'
workflow_dispatch:
concurrency:
group: Weekly Check Dist
cancel-in-progress: true
jobs:
make_dist:
name: Make Dist
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
source: [ { name: 'headless',
conf: '--enable-headlessui',
deps: 'libevdev-dev' },
{ name: 'sdl2',
conf: '--enable-sdl2ui',
deps: 'libsdl2-dev libsdl2-image-dev' },
{ name: 'gtk3',
conf: '--enable-gtk3ui',
deps: 'libevdev-dev libgtk-3-dev libglew-dev' } ]
target: [ { name: 'headless',
conf: '--enable-headlessui',
deps: 'libevdev-dev' },
{ name: 'sdl2',
conf: '--enable-sdl2ui',
deps: 'libsdl2-dev libsdl2-image-dev' },
{ name: 'gtk3',
conf: '--enable-gtk3ui',
deps: 'libevdev-dev libgtk-3-dev libglew-dev' } ]
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: Install Source Dependencies
shell: bash
run: |
sudo apt update
sudo apt install -y autoconf \
automake \
build-essential \
byacc \
dos2unix \
flex \
libasound2-dev \
libcurl4-openssl-dev \
libpulse-dev \
xa65 \
${{ matrix.source.deps }}
- name: Configure Dist
shell: bash
run: |
cd vice
./autogen.sh
./configure --enable-option-checking=fatal \
${{ matrix.source.conf }} \
--disable-html-docs \
--disable-pdf-docs \
--with-resid
- name: Make Dist
id: make_dist
shell: bash
run: |
cd vice
make -j2 -s --no-print-directory dist
echo "tarball=$(basename vice-*.tar.gz)" >> $GITHUB_OUTPUT
echo "tardir=$(basename -s .tar.gz vice-*.tar.gz)" >> $GITHUB_OUTPUT
echo "artifact_name=$(basename -s .tar.gz vice-*.tar.gz)-${{ matrix.source.name }}.tar.gz" >> $GITHUB_OUTPUT
- name: Upload Artifact
uses: actions/upload-artifact@v4
# This makes sure we only upload artifacts for the different configure
# options used when creating the tarballs, not every combination of
# source and target:
if: matrix.source.name == matrix.target.name
with:
name: ${{ steps.make_dist.outputs.artifact_name }}
path: vice/${{ steps.make_dist.outputs.tarball }}
retention-days: 7
- name: Install Target Dependencies
shell: bash
run: |
sudo apt install -y ${{ matrix.target.deps }}
sudo apt install -y texinfo texlive-fonts-recommended texlive-latex-extra
- name: Configure Target Build
id: configure_target
shell: bash
run: |
BUILDDIR=${{ matrix.target.name }}-build
echo "builddir=${BUILDDIR}" >> $GITHUB_OUTPUT
mkdir ${BUILDDIR} && cd ${BUILDDIR}
tar -xzf ../vice/${{ steps.make_dist.outputs.tarball }}
cd ${{ steps.make_dist.outputs.tardir }}
./configure --enable-option-checking=fatal ${{matrix.target.conf }} \
--with-resid --with-fastsid --enable-html-docs --enable-pdf-docs
- name: Make Target Build
shell: bash
run: |
cd ${{ steps.configure_target.outputs.builddir }}
cd ${{ steps.make_dist.outputs.tardir }}
make -j2 -s --no-print-directory
- name: Install Target Build
shell: bash
run: |
INSTALLDIR=${{ matrix.target.name }}-install
mkdir ${INSTALLDIR}
cd ${{ steps.configure_target.outputs.builddir }}
cd ${{ steps.make_dist.outputs.tardir }}
make -j2 -s --no-print-directory DESTDIR="../../${INSTALLDIR}" install
- name: Report Failure
env:
IRC_PASS: ${{ secrets.IRC_PASS }}
if: ${{ failure() }}
shell: bash
run: |
./vice/build/github-actions/irc-message.sh "make dist => make failed for ${{ matrix.source.name }} => ${{ matrix.target.name }}"
diff_dists:
name: Check dist tarballs for content differences
runs-on: ubuntu-latest
needs: make_dist
strategy:
fail-fast: true
steps:
- name: Checkout Source
uses: actions/checkout@v4
- name: Download Dist Tarballs
uses: actions/download-artifact@v4
# we don't specify an artifact name or download path so we download
# all artifacts to the current working directory
- name: Check Dist Tarballs
shell: bash
run: vice/build/github-actions/compare-dists.sh
- name: Report Failure
env:
IRC_PASS: ${{ secrets.IRC_PASS }}
if: ${{ failure() }}
shell: bash
run: |
./vice/build/github-actions/irc-message.sh "Dist tarballs do not match. See log of 'Weekly Check Dist' github action."