Weekly Check Dist #135
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." |