Core version for Python
This commit is contained in:
parent
12ce72448b
commit
9bd07530c1
|
@ -9,11 +9,12 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
feature: [core, js]
|
||||||
os: [macos-11.0, ubuntu-latest, windows-latest]
|
os: [macos-11.0, ubuntu-latest, windows-latest]
|
||||||
python: [3.7, 3.8, 3.9]
|
python: [3.7, 3.8, 3.9]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
|
@ -44,7 +45,9 @@ jobs:
|
||||||
|
|
||||||
- name: Build native module
|
- name: Build native module
|
||||||
working-directory: ./python
|
working-directory: ./python
|
||||||
run: cargo build --release
|
run: |
|
||||||
|
cp Cargo.${{ matrix.feature }}.toml Cargo.toml
|
||||||
|
cargo build --release
|
||||||
|
|
||||||
- name: Install Python build tools (macOS)
|
- name: Install Python build tools (macOS)
|
||||||
if: runner.os == 'macOS'
|
if: runner.os == 'macOS'
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/Cargo.lock
|
/Cargo.lock
|
||||||
|
/Cargo.toml
|
||||||
/target/
|
/target/
|
||||||
|
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
[package]
|
||||||
|
publish = false
|
||||||
|
name = "minify_html_core"
|
||||||
|
description = "Extremely fast and smart HTML minifier"
|
||||||
|
license = "MIT"
|
||||||
|
homepage = "https://github.com/wilsonzlin/minify-html"
|
||||||
|
readme = "README.md"
|
||||||
|
repository = "https://github.com/wilsonzlin/minify-html.git"
|
||||||
|
version = "0.4.3"
|
||||||
|
authors = ["Wilson Lin <code@wilsonl.in>"]
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
name = "minify_html_core"
|
||||||
|
crate-type = ["cdylib"]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
minify-html = { path = "..", features = [] }
|
||||||
|
[dependencies.pyo3]
|
||||||
|
version = "0.13.0"
|
||||||
|
features = ["extension-module"]
|
2
version
2
version
|
@ -69,7 +69,7 @@ cmd('git', 'pull');
|
||||||
cmd('bash', './prebuild.sh');
|
cmd('bash', './prebuild.sh');
|
||||||
cmd('cargo', 'test', '--features', 'js-esbuild');
|
cmd('cargo', 'test', '--features', 'js-esbuild');
|
||||||
|
|
||||||
for (const f of ['Cargo.toml', 'cli/Cargo.toml', 'nodejs/native/Cargo.toml', 'java/Cargo.toml', 'python/Cargo.toml', 'ruby/Cargo.toml']) {
|
for (const f of ['Cargo.toml', 'cli/Cargo.toml', 'nodejs/native/Cargo.toml', 'java/Cargo.toml', 'python/Cargo.core.toml', 'python/Cargo.js.toml', 'ruby/Cargo.toml']) {
|
||||||
replaceInFile(f, /^version = "\d+\.\d+\.\d+"\s*$/m, `version = "${NEW_VERSION}"`);
|
replaceInFile(f, /^version = "\d+\.\d+\.\d+"\s*$/m, `version = "${NEW_VERSION}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue