From 95d480b127a516600cb281ed91c529ec13b172eb Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Fri, 18 Mar 2022 19:42:16 +0100 Subject: [PATCH] The things we do for reproducible builds --- .github/workflows/phar.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/phar.yml b/.github/workflows/phar.yml index e9f8993910..31cf1495a7 100644 --- a/.github/workflows/phar.yml +++ b/.github/workflows/phar.yml @@ -72,11 +72,28 @@ jobs: - name: "Set autoloader suffix" run: "composer config autoloader-suffix PHPStanChecksum" + - name: "Install libfaketime" + run: "sudo apt-get install -y libfaketime" + + - name: "Test libfaketime" + run: "date" + env: + FAKETIME: 2017-10-11 08:58:00 + LD_PRELOAD: /usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1 + + - name: "Reset timestamps" + run: 'find . -type f -exec touch {} +' + env: + FAKETIME: 2017-10-11 08:58:00 + LD_PRELOAD: /usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1 + - name: "Compile PHAR for checksum" working-directory: "compiler/build" run: "php box.phar compile --no-parallel" env: PHAR_CHECKSUM: "1" + FAKETIME: 2017-10-11 08:58:00 + LD_PRELOAD: /usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1 - name: "Unset autoloader suffix" run: "composer config autoloader-suffix --unset"