Branch Build (1.51) - main #51
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
name: Build | |
run-name: "Branch Build (${{ github.run_attempt }}.${{ github.run_number }}) - ${{ github.ref_name }}" | |
on: | |
workflow_dispatch: | |
inputs: | |
howso-engine-build: | |
description: | | |
(Optional) howso-engine build or version number. Defaults to pinned release. | |
Examples: | |
'6807310618', | |
'https://github.com/howsoai/howso-engine/actions/runs/6807310618', | |
'57.0.1' | |
required: false | |
type: string | |
amalgam-lang-py-build: | |
description: | | |
(Optional) amalgam-lang-py build or version number. Defaults to pinned release. | |
required: false | |
type: string | |
workflow_call: | |
inputs: | |
build-type: | |
required: false | |
type: string | |
optional-release-tag: | |
required: false | |
type: string | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
metadata: | |
uses: howsoai/.github/.github/workflows/set-metadata.yml@main | |
secrets: inherit | |
with: | |
build-type: ${{ inputs.build-type }} | |
optional-release-tag: ${{ inputs.optional-release-tag }} | |
howso-engine-build: ${{ inputs.howso-engine-build }} | |
amalgam-lang-py-build: ${{ inputs.amalgam-lang-py-build }} | |
build: | |
needs: ["metadata"] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download howso-engine | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."howso-engine".run_id') | |
run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."howso-engine".run_type') | |
gh $run_type download -D howso/howso-engine/tmp -R "howsoai/howso-engine" -p "howso-engine-*" "$run_id" | |
# Needed because release/non-release downloads are different structure | |
cd howso/howso-engine/tmp && if [ ! -f *.tar.gz ]; then mv */*.tar.gz ./; fi && tar -xvzf *.tar.gz | |
- name: Configure files | |
run: | | |
cd howso/howso-engine | |
mkdir -p migrations | |
mkdir -p trainee | |
mv tmp/howso.caml howso.caml | |
mv tmp/trainee_template.caml trainee_template.caml | |
mv tmp/migrations/migrations.caml migrations/migrations.caml | |
mv tmp/version.json version.json | |
rm -rf tmp | |
- name: Set workflow run info | |
run: | | |
cd howso/howso-engine | |
run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."howso-engine".run_id') | |
run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."howso-engine".run_type') | |
build_title=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."howso-engine".build_title') | |
build_date=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."howso-engine".build_date') | |
head_sha=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."howso-engine".head_sha') | |
url=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."howso-engine".url') | |
# Set the display title and build date info in version.json | |
if [[ -n 'build_title' ]]; then | |
jq --arg build_title "$build_title" '. |= . + {"display_title": $build_title}' version.json > temp.json && mv temp.json version.json | |
jq --arg build_date "$build_date" '. |= . + {"build_date": $build_date}' version.json > temp.json && mv temp.json version.json | |
fi | |
jq --arg head_sha "$head_sha" '. |= . + {"sha": $head_sha}' version.json > temp.json && mv temp.json version.json | |
jq --arg url "$url" '. |= . + {"url": $url}' version.json > temp.json && mv temp.json version.json | |
cat version.json | |
- name: Compare Amalagam versions | |
run: | | |
cd howso/howso-engine | |
engine_amlg_version=$(jq -r ".dependencies.amalgam" ./version.json) | |
# Go back to root dir | |
cd ../../.. | |
git clone https://github.com/howsoai/amalgam-lang-py.git | |
cd amalgam-lang-py | |
# Checkout the latest tag | |
git checkout $(git describe --tags $(git rev-list --tags --max-count=1)) | |
amlg_lang_amlg_version=$(jq -r ".dependencies.amalgam" ./version.json) | |
# Check major versions only | |
if [[ "${engine_amlg_version:0:1}" != "${amlg_lang_amlg_version:0:1}" ]]; then | |
echo "Critical failure: embedded howso-engine specifies Amalgam v${engine_amlg_version}, but latest amalgam-lang-py specifies Amalgam v${amlg_lang_amlg_version}" | |
exit 1 | |
fi | |
echo "Embedded howso-engine Amalgam version: ${engine_amlg_version}" | |
echo "Latest amalgam-lang-py release Amalgam version: ${amlg_lang_amlg_version}" | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install pypa/build | |
run: >- | |
python3 -m | |
pip install | |
build | |
--user | |
- name: Build a binary wheel and a source tarball | |
run: >- | |
python3 -m | |
build | |
--sdist | |
--wheel | |
--outdir dist/ | |
. | |
env: | |
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ needs.metadata.outputs.version }} | |
- name: Upload Tarball Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: howso-engine-${{ needs.metadata.outputs.version }} | |
path: dist/howso-engine-${{ needs.metadata.outputs.version }}.tar.gz | |
if-no-files-found: error | |
- name: Upload Wheel Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any | |
path: dist/howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any.whl | |
if-no-files-found: error | |
workflow-summary: | |
needs: ['metadata', 'build'] | |
uses: "howsoai/.github/.github/workflows/workflow-summary.yml@main" | |
secrets: inherit | |
with: | |
upstream-details: ${{ needs.metadata.outputs.upstream-details }} | |
pytest-linux-3-8-st: | |
needs: ['metadata', 'build'] | |
uses: howsoai/.github/.github/workflows/pytest.yml@main | |
secrets: inherit | |
with: | |
platform: 'howso-ubuntu-runner-latest' | |
platform-pretty: 'Linux' | |
amalgam-plat-arch: 'linux-amd64' | |
python-version: '3.8' | |
config-fp: './config/latest-st-debug-howso.yml' | |
config-pretty: 'ST' | |
workers: 'auto' | |
upstream-details: ${{ needs.metadata.outputs.upstream-details }} | |
pytest-linux-3-9-mt: | |
needs: ['metadata', 'build'] | |
uses: howsoai/.github/.github/workflows/pytest.yml@main | |
secrets: inherit | |
with: | |
platform: 'howso-ubuntu-runner-latest' | |
platform-pretty: 'Linux' | |
amalgam-plat-arch: 'linux-amd64' | |
python-version: '3.9' | |
config-fp: './config/latest-mt-debug-howso.yml' | |
config-pretty: 'MT' | |
upstream-details: ${{ needs.metadata.outputs.upstream-details }} | |
pytest-linux-3-10-mt: | |
needs: ['metadata', 'build'] | |
uses: howsoai/.github/.github/workflows/pytest.yml@main | |
secrets: inherit | |
with: | |
platform: 'howso-ubuntu-runner-latest' | |
platform-pretty: 'Linux' | |
amalgam-plat-arch: 'linux-amd64' | |
python-version: '3.10' | |
config-fp: './config/latest-mt-debug-howso.yml' | |
config-pretty: 'MT' | |
upstream-details: ${{ needs.metadata.outputs.upstream-details }} | |
pytest-linux-3-11-mt: | |
needs: ['metadata', 'build'] | |
uses: howsoai/.github/.github/workflows/pytest.yml@main | |
secrets: inherit | |
with: | |
platform: 'howso-ubuntu-runner-latest' | |
platform-pretty: 'Linux' | |
amalgam-plat-arch: 'linux-amd64' | |
python-version: '3.11' | |
config-fp: './config/latest-mt-debug-howso.yml' | |
config-pretty: 'MT' | |
upstream-details: ${{ needs.metadata.outputs.upstream-details }} | |
pytest-windows-3-11-mt: | |
needs: ['metadata', 'build'] | |
uses: howsoai/.github/.github/workflows/pytest.yml@main | |
secrets: inherit | |
with: | |
platform: 'howso-windows-runner-latest' | |
platform-pretty: 'Windows' | |
amalgam-plat-arch: 'windows-amd64' | |
python-version: '3.11' | |
config-fp: './config/latest-mt-debug-howso.yml' | |
config-pretty: 'MT' | |
upstream-details: ${{ needs.metadata.outputs.upstream-details }} | |
pytest-macos-3-11-mt: | |
needs: ['metadata', 'build'] | |
uses: howsoai/.github/.github/workflows/pytest.yml@main | |
secrets: inherit | |
with: | |
platform: 'macos-latest-xlarge' | |
platform-pretty: 'MacOS' | |
amalgam-plat-arch: 'darwin-arm64' | |
python-version: '3.11' | |
config-fp: './config/latest-mt-debug-howso.yml' | |
config-pretty: 'MT' | |
upstream-details: ${{ needs.metadata.outputs.upstream-details }} | |
install-verification-linux-amd64: | |
needs: ['metadata', 'build'] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any | |
- name: Download amalgam-lang-py | |
if: inputs.amalgam-lang-py-build != '' | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_id') | |
run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_type') | |
gh $run_type download -D tmp -R "howsoai/amalgam-lang-py" -p "amalgam_lang-*-py3-none-any" "$run_id" | |
# Needed because release/non-release downloads are different structure | |
cd tmp && if [ ! -f *.whl ]; then mv */*.whl ./; fi | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Verify Howso install | |
run: | | |
echo "Installing Howso Engine..." | |
pip install howso_engine-*-py3-none-any.whl | |
if [ -d "tmp" ]; then | |
echo "Found custom amalgam-lang version; installing..." | |
pip uninstall amalgam-lang -y | |
pip install tmp/*.whl | |
fi | |
echo "Running Howso verification..." | |
verify_howso_install | |
- name: Display stacktrace files | |
if: always() | |
run: | | |
cat howso_stacktrace.txt || true | |
install-verification-linux-arm64: | |
if: inputs.build-type != 'PR' | |
needs: ['metadata', 'build'] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any | |
- name: Download amalgam-lang-py | |
if: inputs.amalgam-lang-py-build != '' | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_id') | |
run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_type') | |
gh $run_type download -D tmp -R "howsoai/amalgam-lang-py" -p "amalgam_lang-*-py3-none-any" "$run_id" | |
# Needed because release/non-release downloads are different structure | |
cd tmp && if [ ! -f *.whl ]; then mv */*.whl ./; fi | |
- name: Verify Howso install | |
uses: pguyot/arm-runner-action@v2 | |
with: | |
base_image: raspios_lite_arm64:latest | |
cpu: cortex-a8 | |
image_additional_mb: 1000 | |
commands: | | |
set -e | |
# Install python: | |
sudo apt-get install --no-install-recommends -y python3 python3-pip python-is-python3 | |
python --version | |
# Overwrite pip.conf so pypi is used, not piwheels | |
sudo echo "" > /etc/pip.conf | |
echo "Installing Howso Engine..." | |
# This environment is considered "externally managed," so use --break-system-packages to bypass | |
# (safe in this use case) | |
pip install howso_engine-*-py3-none-any.whl --break-system-packages | |
if [ -d "tmp" ]; then | |
echo "Found custom amalgam-lang version; installing..." | |
pip uninstall amalgam-lang -y --break-system-packages | |
pip install tmp/*.whl --break-system-packages | |
fi | |
# amalgam binaries need this under QEMU | |
PATH=$PATH:/usr/aarch64-linux-gnu | |
echo "Running Howso verification..." | |
- name: Display stacktrace files | |
if: always() | |
run: | | |
cat howso_stacktrace.txt || true | |
install-verification-linux-arm64_8a: | |
if: inputs.build-type != 'PR' | |
needs: ['metadata', 'build'] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any | |
- name: Download amalgam-lang-py | |
if: inputs.amalgam-lang-py-build != '' | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_id') | |
run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_type') | |
gh $run_type download -D tmp -R "howsoai/amalgam-lang-py" -p "amalgam_lang-*-py3-none-any" "$run_id" | |
# Needed because release/non-release downloads are different structure | |
cd tmp && if [ ! -f *.whl ]; then mv */*.whl ./; fi | |
- name: Verify Howso install | |
uses: pguyot/arm-runner-action@v2 | |
with: | |
base_image: raspios_lite_arm64:latest | |
cpu: cortex-a7 | |
image_additional_mb: 1000 | |
commands: | | |
set -e | |
# Install python: | |
sudo apt-get install --no-install-recommends -y python3 python3-pip python-is-python3 | |
python --version | |
# Overwrite pip.conf so pypi is used, not piwheels | |
sudo echo "" > /etc/pip.conf | |
echo "Installing Howso Engine..." | |
# This environment is considered "externally managed," so use --break-system-packages to bypass | |
# (safe in this use case) | |
pip install howso_engine-*-py3-none-any.whl --break-system-packages | |
if [ -d "tmp" ]; then | |
echo "Found custom amalgam-lang version; installing..." | |
pip uninstall amalgam-lang -y --break-system-packages | |
pip install tmp/*.whl --break-system-packages | |
fi | |
# Set local config to use single threaded because arm64_8a doesn't support multi-threading and set | |
# arm64_8a arch since that is not auto selected by the package currently: | |
echo " | |
howso: | |
client: howso.direct.HowsoDirectClient | |
client_extra_params: | |
amalgam: | |
arch: arm64_8a | |
library_postfix: -st | |
" > howso.yml | |
# amalgam binaries need this under QEMU | |
PATH=$PATH:/usr/aarch64-linux-gnu | |
echo "Running Howso verification..." | |
verify_howso_install | |
- name: Display stacktrace files | |
if: always() | |
run: | | |
cat howso_stacktrace.txt || true | |
install-verification-windows-bash-amd64: | |
if: inputs.build-type != 'PR' | |
needs: ['metadata', 'build'] | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any | |
- name: Download amalgam-lang-py | |
if: inputs.amalgam-lang-py-build != '' | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_id') | |
run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_type') | |
gh $run_type download -D tmp -R "howsoai/amalgam-lang-py" -p "amalgam_lang-*-py3-none-any" "$run_id" | |
# Needed because release/non-release downloads are different structure | |
cd tmp && if [ ! -f *.whl ]; then mv */*.whl ./; fi | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Download tz data | |
shell: pwsh | |
run: | | |
./config/powershell/Download-Tzdata.ps1 | |
- name: Verify Howso install | |
run: | | |
echo "Installing Howso Engine..." | |
pip install howso_engine-*-py3-none-any.whl | |
if [ -d "tmp" ]; then | |
echo "Found custom amalgam-lang version; installing..." | |
pip uninstall amalgam-lang -y | |
pip install tmp/*.whl | |
fi | |
echo "Running Howso verification..." | |
PYTHONUTF8=1 verify_howso_install | |
- name: Display stacktrace files | |
if: always() | |
run: | | |
cat howso_stacktrace.txt || true | |
install-verification-windows-cmd-amd64: | |
needs: ['metadata', 'build'] | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any | |
- name: Download amalgam-lang-py | |
if: inputs.amalgam-lang-py-build != '' | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_id') | |
run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_type') | |
gh $run_type download -D tmp -R "howsoai/amalgam-lang-py" -p "amalgam_lang-*-py3-none-any" "$run_id" | |
# Needed because release/non-release downloads are different structure | |
cd tmp && if [ ! -f *.whl ]; then mv */*.whl ./; fi | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Download tz data | |
shell: pwsh | |
run: | | |
./config/powershell/Download-Tzdata.ps1 | |
- name: Verify Howso install | |
shell: cmd | |
run: | | |
@echo off | |
setlocal enabledelayedexpansion | |
echo Installing Howso Engine... | |
REM Globs don't work in cmd with pip | |
pip install howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any.whl | |
if exist "tmp" ( | |
echo Found custom amalgam-lang version, installing... | |
pip uninstall amalgam-lang -y | |
for %%i in (tmp\amalgam*.whl) do (set whlFile=%%~nxi) | |
pip install tmp/!whlFile! | |
) | |
echo Running Howso verification... | |
set PYTHONUTF8=1 | |
verify_howso_install | |
- name: Display stacktrace files | |
if: always() | |
run: | | |
cat howso_stacktrace.txt || true | |
install-verification-windows-pwsh-amd64: | |
if: inputs.build-type != 'PR' | |
needs: ['metadata', 'build'] | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any | |
- name: Download amalgam-lang-py | |
if: inputs.amalgam-lang-py-build != '' | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_id') | |
run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_type') | |
gh $run_type download -D tmp -R "howsoai/amalgam-lang-py" -p "amalgam_lang-*-py3-none-any" "$run_id" | |
# Needed because release/non-release downloads are different structure | |
cd tmp && if [ ! -f *.whl ]; then mv */*.whl ./; fi | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Download tz data | |
shell: pwsh | |
run: | | |
./config/powershell/Download-Tzdata.ps1 | |
- name: Verify Howso install | |
shell: pwsh | |
run: | | |
Write-Host "Installing Howso Engine..." | |
# Globs don't work in pwsh with pip | |
pip install howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any.whl | |
if (Test-Path -Path "tmp" -PathType Container) { | |
Write-Host "Found custom amalgam-lang version; installing.." | |
pip uninstall amalgam-lang -y | |
$whlFile = Get-ChildItem -Path ".\tmp\" -Filter *.whl | |
pip install $whlFile | |
} | |
Write-Host "Running Howso verification..." | |
$env:PYTHONUTF8=1 | |
verify_howso_install | |
- name: Display stacktrace files | |
if: always() | |
run: | | |
cat howso_stacktrace.txt || true | |
install-verification-macos-amd64: | |
needs: ['metadata', 'build'] | |
runs-on: macos-latest-large | |
steps: | |
- name: Download Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any | |
- name: Download amalgam-lang-py | |
if: inputs.amalgam-lang-py-build != '' | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_id') | |
run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_type') | |
gh $run_type download -D tmp -R "howsoai/amalgam-lang-py" -p "amalgam_lang-*-py3-none-any" "$run_id" | |
# Needed because release/non-release downloads are different structure | |
cd tmp && if [ ! -f *.whl ]; then mv */*.whl ./; fi | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Verify Howso install | |
run: | | |
echo "Installing Howso Engine..." | |
pip install howso_engine-*-py3-none-any.whl | |
if [ -d "tmp" ]; then | |
echo "Found custom amalgam-lang version; installing..." | |
pip uninstall amalgam-lang -y | |
pip install tmp/*.whl | |
fi | |
echo "Running Howso verification..." | |
verify_howso_install | |
- name: Display stacktrace files | |
if: always() | |
run: | | |
cat howso_stacktrace.txt || true | |
install-verification-macos-arm64: | |
needs: ['metadata', 'build'] | |
runs-on: macos-latest-xlarge | |
steps: | |
- name: Download Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: howso_engine-${{ needs.metadata.outputs.version }}-py3-none-any | |
- name: Download amalgam-lang-py | |
if: inputs.amalgam-lang-py-build != '' | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
run_id=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_id') | |
run_type=$(printf "%s" '${{ needs.metadata.outputs.upstream-details }}' | jq -r '."amalgam-lang-py".run_type') | |
gh $run_type download -D tmp -R "howsoai/amalgam-lang-py" -p "amalgam_lang-*-py3-none-any" "$run_id" | |
# Needed because release/non-release downloads are different structure | |
cd tmp && if [ ! -f *.whl ]; then mv */*.whl ./; fi | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Verify Howso install | |
run: | | |
echo "Installing Howso Engine..." | |
pip install howso_engine-*-py3-none-any.whl | |
if [ -d "tmp" ]; then | |
echo "Found custom amalgam-lang version; installing..." | |
pip uninstall amalgam-lang -y | |
pip install tmp/*.whl | |
fi | |
echo "Running Howso verification..." | |
verify_howso_install | |
- name: Display stacktrace files | |
if: always() | |
run: | | |
cat howso_stacktrace.txt || true | |
release: | |
if: inputs.build-type == 'release' | |
environment: | |
name: pypi | |
permissions: | |
contents: write | |
id-token: write | |
needs: | |
- metadata | |
- pytest-linux-3-8-st | |
- pytest-linux-3-9-mt | |
- pytest-linux-3-10-mt | |
- pytest-linux-3-11-mt | |
- pytest-windows-3-11-mt | |
- pytest-macos-3-11-mt | |
- install-verification-linux-amd64 | |
- install-verification-linux-arm64 | |
- install-verification-linux-arm64_8a | |
- install-verification-windows-bash-amd64 | |
- install-verification-windows-cmd-amd64 | |
- install-verification-windows-pwsh-amd64 | |
- install-verification-macos-amd64 | |
- install-verification-macos-arm64 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: ./tmp | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{ needs.metadata.outputs.version }} | |
commit: ${{ github.sha }} | |
name: ${{ github.event.repository.name }} ${{ needs.metadata.outputs.version }} | |
artifactErrorsFailBuild: true | |
generateReleaseNotes: true | |
makeLatest: legacy | |
artifacts: "./tmp/howso-engine-*/howso-engine-*.tar.gz,./tmp/howso_engine-*/howso_engine-*.whl" | |
artifactContentType: application/gzip | |
- name: Clean up dir | |
run: | | |
mkdir -p dist | |
find ./tmp -type f -name '*.whl' -exec cp -t ./dist {} + | |
find ./tmp -type f -name '*.tar.gz' -exec cp -t ./dist {} + | |
ls ./dist | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Publish distribution to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |