From e5fd3a58c7ca8eb458a8300b5a13df65bbd2042d Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Thu, 24 Aug 2023 11:41:22 -0500 Subject: [PATCH 1/7] feat: include argon2, if it is installed --- .github/workflows/workflow.yml | 8 ++++---- bin/install | 13 +++++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 6967c52..2f7ff79 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -30,10 +30,10 @@ jobs: steps: - name: Install packages - run: apt-get update && apt-get install -y autoconf bison build-essential curl gettext git libgd-dev libcurl4-openssl-dev libedit-dev libicu-dev libjpeg-dev libmysqlclient-dev libonig-dev libpng-dev libpq-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libzip-dev openssl pkg-config re2c zlib1g-dev + run: apt-get update && apt-get install -y autoconf bison build-essential curl gettext git libargon2-dev libgd-dev libcurl4-openssl-dev libedit-dev libicu-dev libjpeg-dev libmysqlclient-dev libonig-dev libpng-dev libpq-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libzip-dev openssl pkg-config re2c zlib1g-dev - name: asdf_plugin_test - uses: asdf-vm/actions/plugin-test@v1 + uses: asdf-vm/actions/plugin-test@v2 with: command: php --version version: ${{ matrix.php-version }} @@ -54,13 +54,13 @@ jobs: steps: - name: Install packages - run: brew install autoconf automake bison freetype gd gettext icu4c krb5 libedit libiconv libjpeg libpng libxml2 libzip openssl@1.1 pcre postgres pkg-config re2c zlib + run: brew install argon2 autoconf automake bison freetype gd gettext icu4c krb5 libedit libiconv libjpeg libpng libxml2 libzip openssl@1.1 pcre postgres pkg-config re2c zlib - name: Install conflicting packages run: brew install openssl@3 - name: asdf_plugin_test - uses: asdf-vm/actions/plugin-test@v1 + uses: asdf-vm/actions/plugin-test@v2 with: command: php --version version: ${{ matrix.php-version }} diff --git a/bin/install b/bin/install index 3415afc..4d984b3 100755 --- a/bin/install +++ b/bin/install @@ -23,6 +23,7 @@ install_php() { if [[ $operating_system =~ "Darwin" ]]; then exit_if_homebrew_not_installed + local argon2_path=$(homebrew_package_path argon2) local bison_path=$(homebrew_package_path bison) local icu4c_path=$(homebrew_package_path icu4c) local krb5_path=$(homebrew_package_path krb5) @@ -30,6 +31,11 @@ install_php() { local libxml2_path=$(homebrew_package_path libxml2) local openssl_path=$(homebrew_package_path openssl@1.1) + # argon2 is optional + if [ -n "$argon2_path" ]; then + export "PKG_CONFIG_PATH=${argon2_path}/lib/pkgconfig:${PKG_CONFIG_PATH}" + fi + if [ -n "$bison_path" ]; then export "PATH=${bison_path}/bin:${PATH}" else @@ -213,6 +219,7 @@ os_based_configure_options() { # optional # if these packages exist they are included in the php compilation + local argon2_path=$(homebrew_package_path argon2) local gmp_path=$(homebrew_package_path gmp) local sodium_path=$(homebrew_package_path libsodium) @@ -228,6 +235,12 @@ os_based_configure_options() { echo "sodium not found, not including in installation" fi + if [ -n "$argon2_path" ]; then + configure_options="$configure_options --with-password-argon2" + else + echo "argon2 not found, not including in installation" + fi + if [ -n "$freetype_path" ]; then configure_options="$configure_options --with-freetype-dir=$freetype_path" else From bce0e007f0d05cb4a7cdb7088eebdc36ce779f27 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Thu, 24 Aug 2023 11:46:24 -0500 Subject: [PATCH 2/7] chore: run actions on pull requests against master --- .github/workflows/workflow.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 2f7ff79..7069327 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -2,6 +2,8 @@ name: Main workflow on: pull_request: + branches: + - master push: branches: - master From 364b6249ac555634cbcc9614bb4aab7f82ad0015 Mon Sep 17 00:00:00 2001 From: Adam Hawkins Date: Thu, 24 Aug 2023 14:12:42 -1000 Subject: [PATCH 3/7] chore(*): trigger build From 4988ee2f6986f24e9faa06559b9b8abd3f6b3518 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Thu, 24 Aug 2023 19:35:18 -0500 Subject: [PATCH 4/7] chore: install correct packages --- .github/workflows/workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 7069327..cc5b590 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -56,7 +56,7 @@ jobs: steps: - name: Install packages - run: brew install argon2 autoconf automake bison freetype gd gettext icu4c krb5 libedit libiconv libjpeg libpng libxml2 libzip openssl@1.1 pcre postgres pkg-config re2c zlib + run: brew install argon2 autoconf automake bison freetype gd gettext icu4c krb5 libedit libiconv libjpeg libpng libxml2 libzip openssl@1.1 pcre postgresql@14 pkg-config re2c zlib - name: Install conflicting packages run: brew install openssl@3 @@ -75,7 +75,7 @@ jobs: uses: actions/checkout@v2 - name: Install shfmt - run: brew install shfmt + run: apt-get update && apt-get install -y shfmt - name: Run shfmt run: make fmt-check From e0d32af0d78287443ec0ddefa49dedff0422223f Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Thu, 24 Aug 2023 19:37:43 -0500 Subject: [PATCH 5/7] chore: use sudo to install on Ubuntu --- .github/workflows/workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index cc5b590..69ee5e4 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -32,7 +32,7 @@ jobs: steps: - name: Install packages - run: apt-get update && apt-get install -y autoconf bison build-essential curl gettext git libargon2-dev libgd-dev libcurl4-openssl-dev libedit-dev libicu-dev libjpeg-dev libmysqlclient-dev libonig-dev libpng-dev libpq-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libzip-dev openssl pkg-config re2c zlib1g-dev + run: sudo apt-get update && sudo apt-get install -y autoconf bison build-essential curl gettext git libargon2-dev libgd-dev libcurl4-openssl-dev libedit-dev libicu-dev libjpeg-dev libmysqlclient-dev libonig-dev libpng-dev libpq-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libzip-dev openssl pkg-config re2c zlib1g-dev - name: asdf_plugin_test uses: asdf-vm/actions/plugin-test@v2 @@ -75,7 +75,7 @@ jobs: uses: actions/checkout@v2 - name: Install shfmt - run: apt-get update && apt-get install -y shfmt + run: sudo apt-get update && sudo apt-get install -y shfmt - name: Run shfmt run: make fmt-check From 07dd20aa0ee1869376bf28074b61634912098678 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Thu, 24 Aug 2023 19:40:15 -0500 Subject: [PATCH 6/7] chore: do not run the Linux build in a separate container --- .github/workflows/workflow.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 69ee5e4..fb1ff25 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -12,24 +12,16 @@ on: jobs: plugin-test-docker: + runs-on: ubuntu-latest + strategy: matrix: - container: - - ubuntu:latest php-version: - 7.4.22 - 7.4.25 - 8.0.8 - 8.1.0 - env: - DEBIAN_FRONTEND: noninteractive - - container: - image: ${{ matrix.container }} - - runs-on: ubuntu-latest - steps: - name: Install packages run: sudo apt-get update && sudo apt-get install -y autoconf bison build-essential curl gettext git libargon2-dev libgd-dev libcurl4-openssl-dev libedit-dev libicu-dev libjpeg-dev libmysqlclient-dev libonig-dev libpng-dev libpq-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libzip-dev openssl pkg-config re2c zlib1g-dev From 1bd29845ef53fa0ba31e8b58a8ca3718e683fc16 Mon Sep 17 00:00:00 2001 From: Adam Hawkins Date: Thu, 24 Aug 2023 21:48:26 -1000 Subject: [PATCH 7/7] chore(git): clean up merge commit --- .github/workflows/workflow.yml | 73 ---------------------------------- 1 file changed, 73 deletions(-) delete mode 100644 .github/workflows/workflow.yml diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml deleted file mode 100644 index fb1ff25..0000000 --- a/.github/workflows/workflow.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: Main workflow - -on: - pull_request: - branches: - - master - push: - branches: - - master - schedule: - - cron: 0 0 * * 5 - -jobs: - plugin-test-docker: - runs-on: ubuntu-latest - - strategy: - matrix: - php-version: - - 7.4.22 - - 7.4.25 - - 8.0.8 - - 8.1.0 - - steps: - - name: Install packages - run: sudo apt-get update && sudo apt-get install -y autoconf bison build-essential curl gettext git libargon2-dev libgd-dev libcurl4-openssl-dev libedit-dev libicu-dev libjpeg-dev libmysqlclient-dev libonig-dev libpng-dev libpq-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libzip-dev openssl pkg-config re2c zlib1g-dev - - - name: asdf_plugin_test - uses: asdf-vm/actions/plugin-test@v2 - with: - command: php --version - version: ${{ matrix.php-version }} - - plugin-test-macos: - strategy: - matrix: - os: - - macos-11 - - macos-10.15 - php-version: - - 7.4.22 - - 7.4.25 - - 8.0.8 - - 8.1.0 - - runs-on: ${{ matrix.os }} - - steps: - - name: Install packages - run: brew install argon2 autoconf automake bison freetype gd gettext icu4c krb5 libedit libiconv libjpeg libpng libxml2 libzip openssl@1.1 pcre postgresql@14 pkg-config re2c zlib - - - name: Install conflicting packages - run: brew install openssl@3 - - - name: asdf_plugin_test - uses: asdf-vm/actions/plugin-test@v2 - with: - command: php --version - version: ${{ matrix.php-version }} - - format: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Install shfmt - run: sudo apt-get update && sudo apt-get install -y shfmt - - - name: Run shfmt - run: make fmt-check