-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add pyinstaller * pyinstaller compilation smoke test * pyinstaller: move to dev deps, add py version * add --hidden-import jinja2_ansible_filters * chore: testing ci * chore: testing ci * chore: testing ci * chore: testing ci * chore: testing ci * chore: testing ci * chore: testing ci * chore: testing ci * chore: testing ci * chore: testing ci * chore: testing ci * chore: testing ci * chore: testing ci * chore: testing ci * chore: testing ci * chore: testing ci * chore: testing ci * chore: testing ci * docs: wip adr * chore: test * docs: added some points about Nuitka * chore: testing ci * chore: testing ci * chore: testing ci * chore: adding multiple os runs for build * chore: improving build * chore: fixing tests; removing setting from vscode clashing with ruff * chore: testing ci * chore: testing ci * chore: testing ci * chore: testing ci * chore: testing ci * cI: refining ci/cd pipelines; dumping binaries to (pre)release * chore: adding new poetry action to cd * chore: removing old adr draft * chore: addressing pr comments * chore: patching tealer --------- Co-authored-by: Joe Polny <joepolny@gmail.com> Co-authored-by: Negar Abbasi <negar.abbasi@makerx.com.au>
- Loading branch information
1 parent
3b0f258
commit daa9fc5
Showing
22 changed files
with
4,412 additions
and
191 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,67 @@ | ||
name: "Setup, Build, and Test" | ||
description: "Set up Python with Poetry, build and test binaries" | ||
inputs: | ||
package_name: | ||
description: "The name of the package to build and test" | ||
required: true | ||
upload_binaries: | ||
description: "Flag to determine if this is a production release" | ||
required: true | ||
operating_system: | ||
description: "Operating system to set the correct binary path and extension" | ||
required: true | ||
build_command: | ||
description: "Command to build the binaries" | ||
required: true | ||
python_version: | ||
description: "Python version to use" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Build Executable | ||
run: ${{ inputs.build_command }} | ||
shell: bash | ||
|
||
- name: Test Executable | ||
run: | | ||
ls -l dist | ||
./dist/${{ inputs.package_name }}/${{ inputs.package_name }}${{ inputs.operating_system == 'windows-latest' && '.exe' || '' }} --help | ||
shell: bash | ||
|
||
- name: Set release version | ||
shell: bash | ||
continue-on-error: true | ||
if: ${{ inputs.upload_binaries == 'true' }} | ||
run: | | ||
echo "RELEASE_VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_ENV | ||
git describe --tags $(git rev-list --tags --max-count=1) | ||
- name: Zip binaries | ||
shell: bash | ||
continue-on-error: true | ||
if: ${{ inputs.upload_binaries == 'true' }} | ||
run: | | ||
ls -l dist | ||
cd dist/algokit/ | ||
tar -zcvf ../../algokit-${{ env.RELEASE_VERSION }}-${{ inputs.operating_system }}-py${{ inputs.python_version }}.tar.gz * | ||
cd ../.. | ||
ls -l | ||
- name: Upload binary as artifact | ||
if: ${{ inputs.upload_binaries == 'true' }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: algokit-cli-${{ inputs.operating_system }}-py${{ inputs.python_version }} | ||
path: algokit-${{ env.RELEASE_VERSION }}-${{ inputs.operating_system }}-py${{ inputs.python_version }}.tar.gz | ||
|
||
- name: Append binary to release | ||
continue-on-error: true | ||
if: ${{ inputs.upload_binaries == 'true' }} | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
algokit-${{ env.RELEASE_VERSION }}-${{ inputs.operating_system }}-py${{ inputs.python_version }}.tar.gz | ||
tag_name: ${{ env.RELEASE_VERSION }} | ||
prerelease: ${{ contains(env.RELEASE_VERSION, 'beta') }} |
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,22 @@ | ||
name: "Python Poetry Action" | ||
description: "An action to setup Poetry" | ||
inputs: | ||
poetry-version: | ||
description: "The version of poetry to install" | ||
required: false | ||
default: "latest" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- run: | | ||
pip install --user pipx | ||
pipx ensurepath | ||
shell: bash | ||
- if: ${{ inputs.poetry-version == 'latest' }} | ||
run: | | ||
pipx install poetry | ||
shell: bash | ||
- if: ${{ inputs.poetry-version != 'latest' }} | ||
run: | | ||
pipx install poetry==${{ inputs.poetry-version }} | ||
shell: bash |
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,135 @@ | ||
name: Build, Test and Publish Pyinstaller Binaries | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
upload_binaries: | ||
required: true | ||
type: string | ||
python_version: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build-binaries-ubuntu: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source code (for release) | ||
uses: actions/checkout@v4 | ||
if: ${{ inputs.upload_binaries == 'true' }} | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Checkout source code (for build) | ||
uses: actions/checkout@v4 | ||
if: ${{ inputs.upload_binaries != 'true' }} | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python_version }} | ||
|
||
- name: Set up Poetry | ||
uses: ./.github/actions/setup-poetry | ||
|
||
- uses: actions/cache@v4 | ||
name: Setup poetry cache | ||
with: | ||
path: ./.venv | ||
key: venv-${{ hashFiles('poetry.lock') }}-${{ runner.os }}-${{ inputs.python_version }} | ||
|
||
- name: Install dependencies | ||
run: poetry install --no-interaction | ||
|
||
- name: Build linux binary | ||
uses: ./.github/actions/build-binaries | ||
with: | ||
python_version: ${{ inputs.python_version }} | ||
package_name: "algokit" | ||
upload_binaries: ${{ inputs.upload_binaries }} | ||
operating_system: ${{ runner.os }} | ||
build_command: "poetry run poe package_unix" | ||
|
||
build-binaries-windows: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout source code (for release) | ||
uses: actions/checkout@v4 | ||
if: ${{ inputs.upload_binaries == 'true' }} | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Checkout source code (for build) | ||
uses: actions/checkout@v4 | ||
if: ${{ inputs.upload_binaries != 'true' }} | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python_version }} | ||
|
||
- name: Set up Poetry | ||
uses: ./.github/actions/setup-poetry | ||
|
||
- uses: actions/cache@v4 | ||
name: Setup poetry cache | ||
with: | ||
path: ./.venv | ||
key: venv-${{ hashFiles('poetry.lock') }}-${{ runner.os }}-${{ inputs.python_version }} | ||
|
||
- name: Install dependencies | ||
run: poetry install --no-interaction | ||
|
||
- name: Build windows binary | ||
uses: ./.github/actions/build-binaries | ||
with: | ||
python_version: ${{ inputs.python_version }} | ||
package_name: "algokit" | ||
upload_binaries: ${{ inputs.upload_binaries }} | ||
operating_system: ${{ runner.os }} | ||
build_command: "poetry run poe package_windows" | ||
|
||
build-binaries-macos: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout source code (for release) | ||
uses: actions/checkout@v4 | ||
if: ${{ inputs.upload_binaries == 'true' }} | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Checkout source code (for build) | ||
uses: actions/checkout@v4 | ||
if: ${{ inputs.upload_binaries != 'true' }} | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python_version }} | ||
|
||
- name: Set up Poetry | ||
uses: ./.github/actions/setup-poetry | ||
|
||
- uses: actions/cache@v4 | ||
name: Setup poetry cache | ||
with: | ||
path: ./.venv | ||
key: venv-${{ hashFiles('poetry.lock') }}-${{ runner.os }}-${{ inputs.python_version }} | ||
|
||
- name: Install dependencies | ||
run: poetry install --no-interaction | ||
|
||
- name: Build macos binary | ||
uses: ./.github/actions/build-binaries | ||
with: | ||
python_version: ${{ inputs.python_version }} | ||
package_name: "algokit" | ||
upload_binaries: ${{ inputs.upload_binaries }} | ||
operating_system: ${{ runner.os }} | ||
build_command: "poetry run poe package_unix" |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
daa9fc5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report