Skip to content

Commit

Permalink
Modernize CI configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jbboehr committed Sep 28, 2024
1 parent d89c051 commit 6d92704
Show file tree
Hide file tree
Showing 6 changed files with 396 additions and 233 deletions.
44 changes: 23 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
COVERAGE: ["true", "false"]
steps:
- uses: actions/checkout@v3
Expand All @@ -37,23 +38,24 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage.info

osx:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
PHP_VERSION:
- "8.1"
- "8.2"
- "8.3"
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: I am tired of writing this shit in YAML and learning a new DSL for every CI service so I'm putting everything in a FSCKING BASH SCRIPT
env:
PHP_VERSION: ${{ matrix.PHP_VERSION }}
run: bash ./.github/scripts/osx.sh
# broken and don't care apple is trash
# osx:
# runs-on: macos-latest
# strategy:
# fail-fast: false
# matrix:
# PHP_VERSION:
# # - "8.1"
# # - "8.2"
# - "8.3"
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: recursive
# - name: I am tired of writing this shit in YAML and learning a new DSL for every CI service so I'm putting everything in a FSCKING BASH SCRIPT
# env:
# PHP_VERSION: ${{ matrix.PHP_VERSION }}
# run: bash ./.github/scripts/osx.sh

docker-debian:
runs-on: ubuntu-latest
Expand All @@ -64,6 +66,7 @@ jobs:
- "8.1"
- "8.2"
- "8.3"
- "8.4.0RC1"
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -83,6 +86,7 @@ jobs:
- "8.1"
- "8.2"
- "8.3"
- "8.4.0RC1"
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -139,18 +143,16 @@ jobs:
nix-store.nar-${{ runner.os }}-${{ hashFiles('flake.lock') }}-
nix-store.nar-${{ runner.os }}-
- uses: cachix/install-nix-action@v26
- uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-23.11
nix_path: nixpkgs=channel:nixos-24.05
extra_nix_config: "system-features = nixos-test benchmark big-parallel kvm"

- name: Import Nix Store Cache
if: "steps.nix-cache.outputs.cache-hit == 'true'"
run: |
nix-store --import < /tmp/nix-store.nar
- run: sudo sysctl -w kernel.perf_event_paranoid=1

- run: nix build -L ".#${{ matrix.attr }}"

- name: Export Nix Store Cache
Expand Down
11 changes: 5 additions & 6 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
BSD 2-Clause License
====================

_Copyright © `2016`, `John Boehr`_
_Copyright © anno Domini nostri Jesu Christi MMXVI-MMXXIV John Boehr & contributors_
_All rights reserved._

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
Expand All @@ -25,6 +25,5 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the FreeBSD Project.

8 changes: 8 additions & 0 deletions config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ PHP_ARG_ENABLE(handlebars-psr, whether to enable handlebars PSR support,
PHP_ARG_ENABLE(handlebars-hardening, whether to enable handlebars hardening support,
[ --enable-handlebars-hardening Enable handlebars hardening support], [yes], [no])

PHP_ARG_ENABLE(handlebars-coverage, whether to enable handlebars coverage support,
[AS_HELP_STRING([--enable-handlebars-coverage], [Enable handlebars coverage support])], [no], [no])

AC_DEFUN([PHP_HANDLEBARS_ADD_SOURCES], [
PHP_HANDLEBARS_SOURCES="$PHP_HANDLEBARS_SOURCES $1"
])
Expand Down Expand Up @@ -147,6 +150,11 @@ if test "$PHP_HANDLEBARS" != "no"; then
])
fi

if test "$PHP_HANDLEBARS_COVERAGE" == "yes"; then
CFLAGS="-fprofile-arcs -ftest-coverage $CFLAGS"
LDFLAGS="--coverage $LDFLAGS"
fi

PHP_ADD_BUILD_DIR(src)
PHP_INSTALL_HEADERS([ext/handlebars], [php_handlebars.h])
PHP_NEW_EXTENSION(handlebars, $PHP_HANDLEBARS_SOURCES, $ext_shared, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
Expand Down
Loading

0 comments on commit 6d92704

Please sign in to comment.