Added PPM Support

This commit is contained in:
Zi Xing 2021-09-01 20:09:14 -04:00
parent 6917d7cc95
commit 87799605d3
10 changed files with 2401 additions and 2024 deletions

View File

@ -0,0 +1,37 @@
name: PPM Compile MarkdownParser
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Add repoistory for PHP 8.0
run: sudo add-apt-repository ppa:ondrej/php
- name: Install PHP 8.0
run: sudo apt-get install php8.0 php8.0-curl php8.0-mbstring php8.0-tokenizer php8.0-fileinfo
- uses: actions/checkout@v2
with:
repository: intellivoid/ppm
ref: "production"
token: ${{ secrets.PPM_ACCESS_TOKEN }}
- name: Install PPM
run: sudo ./install
- name: Configuring PPM
run: sudo ppm --github-add-pat --alias="system" --token="${{ secrets.PPM_ACCESS_TOKEN }}"
- uses: actions/checkout@master
- name: Make build directory
run: mkdir build
- name: Prepare MarkdownParser
run: ppm --generate-package="src/MarkdownParser"
- name: Compile MarkdownParser
run: ppm --no-intro --verbose --compile="src/MarkdownParser" --directory="build"
- name: Install MarkdownParser
run: sudo -H ppm --no-prompt --fix-conflict --verbose --install="build/net.intellivoid.markdown_parser.ppm"

View File

@ -0,0 +1,49 @@
name: PPM Release MarkdownParser
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Add repoistory for PHP 8.0
run: sudo add-apt-repository ppa:ondrej/php
- name: Install PHP 8.0
run: sudo apt-get install php8.0 php8.0-curl php8.0-mbstring php8.0-tokenizer php8.0-fileinfo
- uses: actions/checkout@v2
with:
repository: intellivoid/ppm
ref: "production"
token: ${{ secrets.PPM_ACCESS_TOKEN }}
- name: Install PPM
run: sudo ./install
- name: Configuring PPM
run: sudo ppm --github-add-pat --alias="system" --token="${{ secrets.PPM_ACCESS_TOKEN }}"
- uses: actions/checkout@master
- name: Make build directory
run: mkdir build
- name: Prepare MarkdownParser
run: ppm --generate-package="src/MarkdownParser"
- name: Compile MarkdownParser
run: ppm --no-intro --verbose --compile="src/MarkdownParser" --directory="build"
- name: Install MarkdownParser
run: sudo -H ppm --no-prompt --fix-conflict --verbose --install="build/net.intellivoid.markdown_parser.ppm"
- name: Get Package Version
run: echo package_version=$(ppm --get-version="build/net.intellivoid.markdown_parser.ppm") >> $GITHUB_ENV
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: build/net.intellivoid.markdown_parser.ppm
name: "MarkdownParser v${{ env.package_version }}"
tag_name: "v${{ env.package_version }}"
body: "Compiled PPM package for MarkdownParser, version ${{ env.package_version }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
composer.lock
vendor/
build/

1
.ppm_package Normal file
View File

@ -0,0 +1 @@
src/MarkdownParser

View File

@ -1,30 +0,0 @@
language: php
matrix:
include:
- php: 5.3
dist: precise
- php: 5.4
dist: trusty
- php: 5.5
dist: trusty
- php: 5.6
dist: xenial
- php: 7.0
dist: xenial
- php: 7.1
dist: bionic
- php: 7.2
dist: bionic
- php: 7.3
dist: bionic
- php: 7.4
dist: bionic
install:
- composer install --prefer-dist --no-interaction --no-progress
script:
- vendor/bin/phpunit
- vendor/bin/phpunit test/CommonMarkTestWeak.php || true
- '[ -z "$TRAVIS_TAG" ] || [ "$TRAVIS_TAG" == "$(php -r "require(\"Parsedown.php\"); echo Parsedown::version;")" ]'

12
Makefile Normal file
View File

@ -0,0 +1,12 @@
clean:
rm -rf build
build:
mkdir build
ppm --no-intro --compile="src/MarkdownParser" --directory="build"
update:
ppm --generate-package="src/MarkdownParser"
install:
ppm --no-intro --no-prompt --fix-conflict --install="build/net.intellivoid.markdown_parser.ppm"

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php" colors="true">
<testsuites>
<testsuite>
<file>test/ParsedownTest.php</file>
</testsuite>
</testsuites>
</phpunit>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,25 @@
{
"package": {
"package_name": "net.intellivoid.markdown_parser",
"name": "MarkdownParser",
"version": "1.8.0",
"author": "Emanuil Rusev",
"organization": "Erusev",
"description": "Parser for Markdown",
"url": "http://parsedown.org",
"dependencies": [],
"configuration": {
"autoload_method": "generated_spl",
"main": null,
"post_installation": [],
"pre_installation": []
}
},
"components": [
{
"required": true,
"file": "MarkdownParser.php"
}
],
"files": []
}