diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 6bf28ab8..81d67de1 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,8 +1,10 @@ + [] I have added an entry to `docs/changelog.md` - +## Summary of changes ## Test plan + Tested by running ``` # command(s) to exercise these changes diff --git a/.github/workflows/build_executable.yml b/.github/workflows/build_executable.yml new file mode 100644 index 00000000..36cbd6dc --- /dev/null +++ b/.github/workflows/build_executable.yml @@ -0,0 +1,42 @@ +name: Build native gdbgui executables + +on: + pull_request: + push: + branches: + - master + release: + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + python-version: [3.8] + include: + - os: ubuntu-latest + buildname: linux + - os: windows-latest + buildname: windows + - os: macos-latest + buildname: mac + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install nox + - name: Compile ${{ matrix.buildname }} gdbgui executable + run: | + nox --non-interactive --session build_executable_${{ matrix.buildname }} + - name: Upload ${{ matrix.buildname }} executable + if: github.ref == 'refs/heads/master' + uses: actions/upload-artifact@v1 + with: + name: gdbgui_${{ matrix.buildname }} + path: ./executable/${{ matrix.buildname }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 2670454f..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: "Build gdbgui executables" - -on: [push, pull_request] - -jobs: - ubuntu_executable: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: "3.8" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install nox - - name: Compile linux gdbgui executable - run: | - nox --non-interactive --session build_executable_linux - - name: Upload linux executable - if: github.ref == 'refs/heads/master' - uses: actions/upload-artifact@v1 - with: - name: gdbgui_linux - path: ./executable/linux - - mac_executable: - runs-on: macos-latest - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: "3.8" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install nox - - name: Compile mac gdbgui executable - run: | - nox --non-interactive --session build_executable_mac - - name: Upload mac executable - if: github.ref == 'refs/heads/master' - uses: actions/upload-artifact@v1 - with: - name: gdbgui_mac - path: ./executable/mac - - windows_executable: - runs-on: windows-2019 - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: "3.8" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install nox - - name: Compile windows gdbgui executable - run: | - nox --non-interactive --session build_executable_windows - - name: Upload windows executable - if: github.ref == 'refs/heads/master' - uses: actions/upload-artifact@v1 - with: - name: gdbgui_windows - path: ./executable/windows diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..3414e18c --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,67 @@ +# https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions + +name: CI tests + +on: + pull_request: + push: + branches: + - master + release: + +jobs: + run_tests: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + python-version: [3.6, 3.7, 3.8] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install nox + - name: Install gdb ubuntu + run: | + sudo apt-get install gdb + - name: Execute Tests + run: | + nox --non-interactive --session tests-${{ matrix.python-version }} + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install nox + - name: Lint + run: | + nox --non-interactive --session lint + + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install nox + - name: Verify Docs + run: | + nox --non-interactive --session docs diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bdf76dcd..00000000 --- a/.travis.yml +++ /dev/null @@ -1,40 +0,0 @@ -# https://docs.travis-ci.com/user/multi-os/ -os: - - linux - # no osx for now (travis build server doesn't work build it) - # - osx -cache: - pip: true - yarn: true - directories: - - node_modules -language: python -sudo: required -matrix: - allow_failures: - - os: osx - include: - - python: "3.6" - env: NOXSESSION="tests-3.6" - - python: "3.7" - env: NOXSESSION="tests-3.7" - dist: bionic - - python: "3.7" - env: NOXSESSION="lint" - dist: bionic - - python: "3.7" - env: NOXSESSION="docs" - dist: bionic - - python: "3.8-dev" - env: NOXSESSION="tests-3.8" - dist: bionic - -install: - # commands for linux - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install gdb ; fi - # commands for osx - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install homebrew/dupes/gdb; fi - - pip install nox -script: - - nox --non-interactive --session "$NOXSESSION" diff --git a/noxfile.py b/noxfile.py index 6317dfc4..487107ea 100644 --- a/noxfile.py +++ b/noxfile.py @@ -40,7 +40,7 @@ def cover(session): session.run("coverage", "erase") -@nox.session(python="3.7") +@nox.session def lint(session): session.run( "npx", @@ -63,7 +63,7 @@ def lint(session): session.run("python", "setup.py", "check", "--metadata", "--strict") -@nox.session(python="3.7") +@nox.session def autoformat(session): session.install("black") session.run("black", *files_to_lint) @@ -78,7 +78,7 @@ def autoformat(session): ) -@nox.session(python="3.7") +@nox.session def docs(session): session.install(*doc_dependencies) session.run("mkdocs", "build") @@ -93,6 +93,7 @@ def develop(session): session.log("To use, run: '%s'", command) +@nox.session def build(session): session.install("setuptools", "wheel", "twine") session.run("rm", "-rf", "dist", external=True) @@ -101,20 +102,20 @@ def build(session): session.run("twine", "check", "dist/*") -@nox.session(python="3.7") +@nox.session def publish(session): build(session) print("REMINDER: Has the changelog been updated?") session.run("python", "-m", "twine", "upload", "dist/*") -@nox.session(python="3.7") +@nox.session def watch_docs(session): session.install(*doc_dependencies) session.run("mkdocs", "serve") -@nox.session(python="3.7") +@nox.session def publish_docs(session): session.install(*doc_dependencies) session.run("mkdocs", "gh-deploy")