-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: migrate to hatch and update to latest Austin
We migrate the build backend to hatch and add support for the latest version of the Austin binary.
- Loading branch information
Showing
18 changed files
with
379 additions
and
1,244 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,38 @@ | ||
name: Checks | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
typing: | ||
runs-on: "ubuntu-latest" | ||
|
||
name: Type checking | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- run: | | ||
pip install hatch | ||
hatch -e checks run typing | ||
linting: | ||
runs-on: "ubuntu-latest" | ||
|
||
name: Linting | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- run: | | ||
pip install hatch | ||
hatch -e checks run linting |
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,18 +1,20 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
architecture: x64 | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- run: | | ||
pip install poetry poetry-dynamic-versioning | ||
poetry build | ||
poetry publish --username=__token__ --password=${{ secrets.PYPI_TOKEN }} | ||
- run: | | ||
pip install hatch hatch-vcs | ||
hatch build | ||
hatch publish --user=__token__ --auth=${{ secrets.PYPI_TOKEN }} |
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,76 +1,98 @@ | ||
name: Tests | ||
on: push | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
tests: | ||
runs-on: ${{ matrix.os }} | ||
tests-linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest, ubuntu-latest] # windows-latest | ||
name: Tests on ${{ matrix.os }} | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
|
||
name: Tests with Python ${{ matrix.python-version }} on Linux | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
path: main | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v2 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
architecture: x64 | ||
python-version: ${{ matrix.python-version }}-dev | ||
|
||
- name: Checkout Austin development branch | ||
uses: actions/checkout@master | ||
with: | ||
repository: P403n1x87/austin | ||
ref: devel | ||
path: austin | ||
- name: Install dependencies | ||
run: | | ||
pip install hatch | ||
- name: Compile Austin on Linux | ||
- name: Run tests | ||
timeout-minutes: 10 | ||
run: | | ||
hatch run tests.py${{ matrix.python-version }}:tests -svv | ||
- name: Publish coverage metrics | ||
run: | | ||
cd $GITHUB_WORKSPACE/austin | ||
gcc -Wall -O3 -Os -s -pthread src/*.c -o src/austin | ||
if: startsWith(matrix.os, 'ubuntu') | ||
cd $GITHUB_WORKSPACE/main | ||
hatch run coverage:cov | ||
hatch run coverage:codecov | ||
if: matrix.python-version == '3.10' | ||
env: | ||
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} | ||
|
||
# - name: Compile Austin on Windows | ||
# run: | | ||
# cd $env:GITHUB_WORKSPACE/austin | ||
# gcc.exe -O3 -o src/austin.exe src/*.c -lpsapi -Wall -Os -s | ||
# if: startsWith(matrix.os, 'windows') | ||
tests-macos: | ||
runs-on: macos-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
|
||
- name: Compile Austin on macOS | ||
run: | | ||
cd $GITHUB_WORKSPACE/austin | ||
gcc -Wall -O3 -Os src/*.c -o src/austin | ||
if: startsWith(matrix.os, 'macos') | ||
name: Tests with Python ${{ matrix.python-version }} on MacOS | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- run: pip install nox==2020.5.24 | ||
- run: pip install poetry==1.0.5 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }}-dev | ||
|
||
- name: Run nox on Linux | ||
- name: Remove signature from the Python binary | ||
run: | | ||
cd $GITHUB_WORKSPACE/main | ||
export PATH="$GITHUB_WORKSPACE/austin/src:$PATH" | ||
nox | ||
if: "startsWith(matrix.os, 'ubuntu')" | ||
codesign --remove-signature /Library/Frameworks/Python.framework/Versions/${{ matrix.python-version }}/bin/python3 || true | ||
codesign --remove-signature /Library/Frameworks/Python.framework/Versions/${{ matrix.python-version }}/Resources/Python.app/Contents/MacOS/Python || true | ||
- name: Run nox on macOS | ||
- name: Install dependencies | ||
run: | | ||
cd $GITHUB_WORKSPACE/main | ||
export PATH="$GITHUB_WORKSPACE/austin/src:$PATH" | ||
sudo nox | ||
if: startsWith(matrix.os, 'macos') | ||
pip install hatch | ||
# - name: Run nox on Windows | ||
# run: | | ||
# cd $env:GITHUB_WORKSPACE/main | ||
# $env:PATH="$env:GITHUB_WORKSPACE/austin/src;$env:PATH" | ||
# nox | ||
# if: "startsWith(matrix.os, 'windows')" | ||
- name: Run tests | ||
timeout-minutes: 10 | ||
run: | | ||
sudo hatch run tests.py${{ matrix.python-version }}:tests -svv | ||
- name: Publish coverage metrics | ||
tests-win: | ||
runs-on: windows-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
|
||
name: Tests with Python ${{ matrix.python-version }} on Windows | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }}-dev | ||
|
||
- name: Install dependencies | ||
run: | | ||
cd $GITHUB_WORKSPACE/main | ||
nox -rs coverage | ||
if: startsWith(matrix.os, 'ubuntu') | ||
env: | ||
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} | ||
pip install hatch | ||
- name: Run tests | ||
timeout-minutes: 10 | ||
run: | | ||
hatch run tests.py${{ matrix.python-version }}:tests -svv |
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
Oops, something went wrong.