-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #119 from nxt-dev/dev
Release api-v0.17.0
- Loading branch information
Showing
11 changed files
with
195 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: [release] | ||
workflow_dispatch: | ||
branches: [release] | ||
workflow_call: | ||
inputs: | ||
QT_DEPENDENCIES: | ||
description: 'Set to true to install Qt dependencies (Linux)' | ||
required: false | ||
default: 'false' | ||
type: string | ||
|
||
jobs: | ||
run-tests: | ||
uses: nxt-dev/nxt/.github/workflows/unittests.yml@release | ||
with: | ||
QT_DEPENDENCIES: ${{ inputs.QT_DEPENDENCIES }} | ||
build-and-deploy-pypi: | ||
needs: [run-tests] | ||
runs-on: ubuntu-latest | ||
env: | ||
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Checkout build graph (if needed) | ||
if: github.repository != 'nxt-dev/nxt' | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: nxt-dev/nxt | ||
ref: release | ||
path: nxt | ||
sparse-checkout: build | ||
|
||
|
||
- name: Install Python 3.10 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Ensure PIP | ||
run: python -m ensurepip --upgrade | ||
|
||
- name: Install nxt-core (if needed) | ||
if: github.repository != 'nxt-dev/nxt' | ||
run: | | ||
pip install git+https://github.com/nxt-dev/nxt.git@release | ||
- name: Install this package and dependencies | ||
run: | | ||
pip install twine | ||
pip install . | ||
- name: Set NXT_FILE_ROOTS (if needed) | ||
if: github.repository != 'nxt-dev/nxt' | ||
env: | ||
# Thepackaging graph expects nxt to be cloned next to nxt_editor | ||
# this is not possible in GHA so we abuse the file fall backs to | ||
# trick it into working | ||
NXT_FILE_ROOTS: '../docs/api_docs' | ||
run: echo "NXT_FILE_ROOTS=$NXT_FILE_ROOTS" >> $GITHUB_ENV | ||
|
||
- name: Build package and upload | ||
run: | | ||
python -m nxt.cli -vv exec build/packaging.nxt -s /make_and_test_upload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: Unittests | ||
|
||
on: | ||
workflow_dispatch: | ||
branches-ignore: [release] | ||
workflow_call: | ||
inputs: | ||
QT_DEPENDENCIES: | ||
description: 'Set to true to install Qt dependencies (Linux)' | ||
required: false | ||
default: 'false' | ||
type: string | ||
pull_request: | ||
branches-ignore: [release] | ||
push: | ||
branches-ignore: [release] | ||
|
||
jobs: | ||
test-python: | ||
env: | ||
QT_DEPENDENCIES: ${{ inputs.QT_DEPENDENCIES }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
python-version: ['3.7', '3.8', '3.9', '3.10'] | ||
fail-fast: true | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Determine nxt-core branch to use | ||
run: | | ||
if [ "${{ github.ref_name }}" = "release" ]; then | ||
echo "NXT_CORE_BRANCH=release" >> $GITHUB_ENV | ||
else | ||
echo "NXT_CORE_BRANCH=dev" >> $GITHUB_ENV | ||
fi | ||
shell: bash | ||
|
||
- name: Install Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies (Ubuntu) | ||
if: runner.os == 'Linux' && env.QT_DEPENDENCIES == 'true' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
libxkbcommon-x11-0 \ | ||
libxrender1 \ | ||
libxext6 \ | ||
libxcb1 \ | ||
libxcb-icccm4 \ | ||
libxcb-image0 \ | ||
libxcb-keysyms1 \ | ||
libxcb-randr0 \ | ||
libxcb-render0 \ | ||
libxcb-render-util0 \ | ||
libxcb-shape0 \ | ||
libxcb-shm0 \ | ||
libxcb-sync1 \ | ||
libxcb-xfixes0 \ | ||
libxcb-xinerama0 \ | ||
libxcb-xkb1 \ | ||
libqt5x11extras5 \ | ||
xvfb | ||
- name: Ensure PIP | ||
run: python -m ensurepip --upgrade | ||
|
||
- name: Install nxt-core | ||
if: github.repository != 'nxt-dev/nxt' | ||
run: | | ||
pip install git+https://github.com/nxt-dev/nxt.git@${{ env.NXT_CORE_BRANCH }} | ||
- name: Install this package | ||
run: pip install . | ||
|
||
- name: Run tests with xvfb (Ubuntu + Qt) | ||
if: runner.os == 'Linux' && env.QT_DEPENDENCIES == 'true' | ||
run: | | ||
Xvfb :99 -screen 0 1024x768x24 & | ||
export DISPLAY=:99 | ||
python -m nxt.cli test | ||
- name: Run Unittests from CLI | ||
if: env.QT_DEPENDENCIES != 'true' | ||
run: python -m nxt.cli test |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"API": { | ||
"MAJOR": 0, | ||
"MINOR": 16, | ||
"MINOR": 17, | ||
"PATCH": 0 | ||
}, | ||
"GRAPH": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters