From ddd20b48ad776aa5cf880d2f474d6bcb0dc443e8 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 e9f8993910d..bbd9fce89cc 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: libfaketime.so.1 + + - name: "Reset timestamps" + run: 'find . -type f -exec touch {} +' + env: + FAKETIME: 2017-10-11 08:58:00 + LD_PRELOAD: /usr/local/lib/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/local/lib/faketime/libfaketime.so.1 - name: "Unset autoloader suffix" run: "composer config autoloader-suffix --unset"