# SDL: workflows: Do the equivalent of Automake \`make distcheck\`

**URL:** <https://discourse.libsdl.org/t/sdl-workflows-do-the-equivalent-of-automake-make-distcheck/36036>\
**Category:** SDL Commits\
**Created:** [May 9, 2022, 3:48pm UTC](https://discourse.libsdl.org/t/sdl-workflows-do-the-equivalent-of-automake-make-distcheck/36036 "2022-05-09T15:48:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SDLPushPostBot](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/sdlpushpostbot/32/4370_2.png) [@SDLPushPostBot](https://discourse.libsdl.org/u/SDLPushPostBot)\
**Post date:** [May 9, 2022, 3:48pm UTC](https://discourse.libsdl.org/t/sdl-workflows-do-the-equivalent-of-automake-make-distcheck/36036/1 "2022-05-09T15:48:01Z")

</div>

> <https://github.com/libsdl-org/SDL/commit/6e6e425e23eb38ed4e111b1f4ce83d7d86812585>
>
> The official source code release isn't much use unless it contains
> everything th…at users and downstream distributions need to do a
> new build, so check that it does.
> 
> Signed-off-by: Simon McVittie \<smcv@collabora.com\>

```diff
From 6e6e425e23eb38ed4e111b1f4ce83d7d86812585 Mon Sep 17 00:00:00 2001
From: Simon McVittie <[EMAIL REDACTED]>
Date: Thu, 5 May 2022 17:50:28 +0100
Subject: [PATCH] workflows: Do the equivalent of Automake `make distcheck`

The official source code release isn't much use unless it contains
everything that users and downstream distributions need to do a
new build, so check that it does.

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 .github/workflows/main.yml | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 46b97499c88..9f8d83d2fba 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -150,7 +150,18 @@ jobs:
         make -j"${parallel}" -C build-autotools install DESTDIR="${curdir}/DESTDIR-autotools" V=1
         make -j"${parallel}" -C build-autotools/test install DESTDIR="${curdir}/DESTDIR-autotools" V=1
         ( cd DESTDIR-autotools; find ) | LC_ALL=C sort -u
+ - name: Distcheck
+ if: matrix.platform.autotools
+ run: |
+ set -eu
+ parallel="$(getconf _NPROCESSORS_ONLN)"
         make -j"${parallel}" -C build-autotools dist V=1
+ # Similar to Automake `make distcheck`: check that the tarball
+ # release is sufficient to do a new build
+ mkdir distcheck
+ tar -C distcheck -zxf build-autotools/SDL2-*.tar.gz
+ ( cd distcheck/SDL2-* && ./configure )
+ make -j"${parallel}" -C distcheck/SDL2-*
     - name: Run installed-tests from Autotools
       if: "runner.os == 'Linux' && matrix.platform.autotools"
       run: |

```
