mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-10 12:23:22 +08:00
Merge pull request #931 from c-bata/fix-release-action
Fix PyPI release action
This commit is contained in:
@@ -29,7 +29,7 @@ jobs:
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '18'
|
||||
node-version: '20'
|
||||
- name: Build rustlib
|
||||
working-directory: rustlib
|
||||
run: wasm-pack build --target web
|
||||
|
||||
@@ -16,22 +16,16 @@ jobs:
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Build bundle.js
|
||||
working-directory: optuna_dashboard
|
||||
run: |
|
||||
npm install
|
||||
npm run build:prd
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
python-version: '3.11'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip setuptools
|
||||
pip install --progress-bar off wheel twine build
|
||||
- run: python -m build --sdist --wheel
|
||||
|
||||
- run: make python-package
|
||||
- run: twine check dist/*
|
||||
|
||||
- name: Create GitHub release
|
||||
|
||||
@@ -13,27 +13,20 @@ jobs:
|
||||
id-token: write
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Build bundle.js
|
||||
working-directory: optuna_dashboard
|
||||
run: |
|
||||
npm install
|
||||
npm run build:prd
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
python-version: '3.11'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip setuptools
|
||||
pip install --progress-bar off wheel twine build
|
||||
- run: python -m build --sdist --wheel
|
||||
|
||||
- run: make python-package
|
||||
|
||||
- name: Publish distribution to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
python-version: '3.11'
|
||||
architecture: x64
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
@@ -26,6 +26,23 @@ jobs:
|
||||
- run: black --check --diff .
|
||||
- run: isort --check --diff .
|
||||
- run: mypy optuna_dashboard python_tests
|
||||
build-python-package:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '20'
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip setuptools
|
||||
pip install --progress-bar off wheel twine build
|
||||
- run: make python-package
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.DEFAULT_GOAL := sdist
|
||||
.DEFAULT_GOAL := python-package
|
||||
|
||||
PYTHON ?= python3
|
||||
MODE ?= dev
|
||||
@@ -15,7 +15,7 @@ $(RUSTLIB_OUT): rustlib/src/*.rs rustlib/Cargo.toml
|
||||
vscode/assets/bundle.js: $(RUSTLIB_OUT) $(STANDALONE_SRC) tslib
|
||||
cd standalone_app && npm install && npm run build:vscode
|
||||
|
||||
$(DASHBOARD_TS_OUT): $(DASHBOARD_TS_SRC)
|
||||
$(DASHBOARD_TS_OUT): $(DASHBOARD_TS_SRC) tslib
|
||||
cd optuna_dashboard && npm install && npm run build:$(MODE)
|
||||
|
||||
.PHONY: tslib
|
||||
@@ -31,24 +31,21 @@ tslib-test: tslib
|
||||
|
||||
.PHONY: serve-browser-app
|
||||
serve-browser-app: tslib $(RUSTLIB_OUT)
|
||||
cd standalone_app && npm install && npm run watch
|
||||
cd standalone_app && npm i && npm run watch
|
||||
|
||||
.PHONY: vscode-extension
|
||||
vscode-extension: vscode/assets/bundle.js
|
||||
cd vscode && npm install && npm run vscode:prepublish && vsce package
|
||||
cd vscode && npm i && npm run vscode:prepublish && vsce package
|
||||
|
||||
.PHONY: jupyterlab-extension
|
||||
jupyterlab-extension: tslib
|
||||
cd optuna_dashboard && npm install && npm run build:pkg
|
||||
cd jupyterlab && python -m build --sdist
|
||||
|
||||
.PHONY: sdist
|
||||
sdist: pyproject.toml $(DASHBOARD_TS_OUT)
|
||||
python -m build --sdist
|
||||
|
||||
.PHONY: wheel
|
||||
wheel: pyproject.toml $(DASHBOARD_TS_OUT)
|
||||
python -m build --wheel
|
||||
.PHONY: python-package
|
||||
python-package: pyproject.toml tslib
|
||||
cd optuna_dashboard && npm i && npm run build:prd
|
||||
python -m build --sdist --wheel
|
||||
|
||||
.PHONY: docs
|
||||
docs: docs/conf.py $(RST_FILES)
|
||||
@@ -64,4 +61,4 @@ fmt:
|
||||
clean:
|
||||
rm -rf tslib/types/pkg tslib/storage/pkg tslib/react/pkg tslib/react/types
|
||||
rm -rf optuna_dashboard/public/ doc/_build/
|
||||
rm -rf rustlib/pkg standalone_app/public/ vscode/assets/ vscode/*.vsix
|
||||
rm -rf rustlib/pkg vscode/assets/ vscode/*.vsix
|
||||
|
||||
Reference in New Issue
Block a user