Skip to content

Commit

Permalink
Disabled windows build, can't publish anyway
Browse files Browse the repository at this point in the history
  • Loading branch information
ginty committed Aug 6, 2024
1 parent 023842a commit ca11751
Showing 1 changed file with 130 additions and 130 deletions.
260 changes: 130 additions & 130 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
manylinux: auto
# This is required to fix an SSL build error
before-script-linux: yum install perl-IPC-Cmd -y
args: --release --strip --out dist --manifest-path rust/pyapi_metal/Cargo.toml --interpreter python${{ matrix.python-version }}
args: --release --strip --out om_dist --manifest-path rust/pyapi_metal/Cargo.toml --interpreter python${{ matrix.python-version }}
- name: Install Poetry
run: |
pip install poetry==1.3.2
Expand All @@ -117,7 +117,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: om_wheels
path: python/origen_metal/dist/*
path: om_dist/*

# SMcG - Couldn't get this to work with the manylinux2014_x86_64 container, I think the approach of running everything
# inside the manylinux container is wrong since many current Github action packages will not run in it.
Expand Down Expand Up @@ -345,154 +345,154 @@ jobs:
# name: cli
# path: python\origen\origen\__bin__\bin\origen

build_windows:
strategy:
fail-fast: false
matrix:
python-version: ${{ fromJSON(vars.PYTHON_VERSIONS) }}
needs: [precheck]
#build_windows:
# strategy:
# fail-fast: false
# matrix:
# python-version: ${{ fromJSON(vars.PYTHON_VERSIONS) }}
# needs: [precheck]

runs-on: windows-latest
steps:
- uses: actions/checkout@v2
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v2

- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ fromJSON(vars.RUST_VERSION) }}
rustflags:
# - name: Install Rust
# uses: actions-rust-lang/setup-rust-toolchain@v1
# with:
# toolchain: ${{ fromJSON(vars.RUST_VERSION) }}
# rustflags:

- name: Override Project Rust Version
run: rustup override set ${{ fromJSON(vars.RUST_VERSION) }}
# - name: Override Project Rust Version
# run: rustup override set ${{ fromJSON(vars.RUST_VERSION) }}

- name: Check Rust Version
run: |
rustc --version
cargo --version
# - name: Check Rust Version
# run: |
# rustc --version
# cargo --version

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# - name: Setup Python ${{ matrix.python-version }}
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}

- name: Display Python Version
run: python -c "import sys; print(sys.version)"
# - name: Display Python Version
# run: python -c "import sys; print(sys.version)"

- name: Install Poetry
run: |
pip install poetry==1.3.2
poetry --version
# - name: Install Poetry
# run: |
# pip install poetry==1.3.2
# poetry --version

- name: Build Origen Metal Python Package
working-directory: python/origen_metal
run: poetry build --format wheel
# - name: Build Origen Metal Python Package
# working-directory: python/origen_metal
# run: poetry build --format wheel

- name: Display Dist Directory
working-directory: python/origen_metal/dist
run: ls
# - name: Display Dist Directory
# working-directory: python/origen_metal/dist
# run: ls

- name: Upload Origen Metal Python Package Artifact
uses: actions/upload-artifact@v3
with:
name: om_wheels
path: python/origen_metal/dist/origen_metal*
# - name: Upload Origen Metal Python Package Artifact
# uses: actions/upload-artifact@v3
# with:
# name: om_wheels
# path: python/origen_metal/dist/origen_metal*

- name: Get OM Python Package Version
working-directory: python/origen_metal
run: poetry version -s > ${{ env.om_ver_file }}
# - name: Get OM Python Package Version
# working-directory: python/origen_metal
# run: poetry version -s > ${{ env.om_ver_file }}

- name: Upload OM Python Package Version
uses: actions/upload-artifact@v3
with:
name: ${{ env.om_ver_file }}
path: python/origen_metal/${{ env.om_ver_file }}
# - name: Upload OM Python Package Version
# uses: actions/upload-artifact@v3
# with:
# name: ${{ env.om_ver_file }}
# path: python/origen_metal/${{ env.om_ver_file }}

# - name: Build Origen CLI
# working-directory: rust/origen/cli
# run: cargo build --bins --release

# - name: Add Origen to PATH (Linux)
# if: matrix.os == 'ubuntu-latest'
# run: echo "${{ github.workspace }}/rust/origen/target/release" >> $GITHUB_PATH
# # - name: Build Origen CLI
# # working-directory: rust/origen/cli
# # run: cargo build --bins --release
#
# # - name: Add Origen to PATH (Linux)
# # if: matrix.os == 'ubuntu-latest'
# # run: echo "${{ github.workspace }}/rust/origen/target/release" >> $GITHUB_PATH

# - name: Add Origen to PATH (Windows)
# if: matrix.os == 'windows-latest'
# run: echo "${{ github.workspace }}/rust/origen/target/release" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
# # - name: Add Origen to PATH (Windows)
# # if: matrix.os == 'windows-latest'
# # run: echo "${{ github.workspace }}/rust/origen/target/release" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

# - name: Display Origen CLI Version
# run: origen -v
# # - name: Display Origen CLI Version
# # run: origen -v

# - name: Build PyAPI
# working-directory: rust/pyapi
# run: cargo build --release
# # - name: Build PyAPI
# # working-directory: rust/pyapi
# # run: cargo build --release

# - name: Setup App Env
# working-directory: python
# run: origen env setup
# # - name: Setup App Env
# # working-directory: python
# # run: origen env setup

# - name: Display Origen App Version
# working-directory: python
# run: origen -v
# # - name: Display Origen App Version
# # working-directory: python
# # run: origen -v

- name: Build Origen Python Package
working-directory: python/origen
run: poetry build --format wheel
# - name: Build Origen Python Package
# working-directory: python/origen
# run: poetry build --format wheel

- name: Display Dist Directory
working-directory: python/origen/dist
run: ls
# - name: Display Dist Directory
# working-directory: python/origen/dist
# run: ls

- name: Upload Origen Python Package Artifact
uses: actions/upload-artifact@v3
with:
name: origen_wheels
path: python/origen/dist/origen*
# - name: Upload Origen Python Package Artifact
# uses: actions/upload-artifact@v3
# with:
# name: origen_wheels
# path: python/origen/dist/origen*

- name: Get Origen Python Package Version
working-directory: python/origen
run: poetry version -s > ${{ env.origen_ver_file }}

- name: Upload Origen Python Package Version
uses: actions/upload-artifact@v3
with:
name: ${{ env.origen_ver_file }}
path: python/origen/${{ env.origen_ver_file }}

# - name: "Publish To PyPi"
# if: ${{ github.event.inputs.publish_pypi }} == true
# working_directory: python
# run: |
# echo "Publishing to PyPi"
# # poetry publish ...

# - name: "Publish To PyPi Test Server"
# if: ${{ github.event.inputs.publish_pypi_test == 'true' }}
# working-directory: python
# run: |
# echo "Publishing to PyPi Test Server"
# poetry config repositories.pypi-test https://test.pypi.org/legacy/
# poetry config pypi-token.pypi-test ${{ secrets.PYPI_TEST_SERVER_API_TOKEN }}
# poetry publish -r pypi-test

# - name: pypi-publish
# if: ${{ github.event.inputs.publish_pypi_test == 'true' }}
# uses: pypa/gh-action-pypi-publish@v1.4.2
# with:
# packages_dir: python/dist/
# user: __token__
# password: ${{ secrets.PYPI_TEST_SERVER_API_TOKEN }}
# repository_url: https://test.pypi.org/legacy/
# skip_existing: true

# - name: "Publish To Github Releases"
# if: ${{ github.event.inputs.publish_github_release }} == true
# working_directory: python
# run: |
# echo "Publishing to Github Releases"
# # ...
# - name: Get Origen Python Package Version
# working-directory: python/origen
# run: poetry version -s > ${{ env.origen_ver_file }}
#
# - name: Upload Origen Python Package Version
# uses: actions/upload-artifact@v3
# with:
# name: ${{ env.origen_ver_file }}
# path: python/origen/${{ env.origen_ver_file }}
#
# # - name: "Publish To PyPi"
# # if: ${{ github.event.inputs.publish_pypi }} == true
# # working_directory: python
# # run: |
# # echo "Publishing to PyPi"
# # # poetry publish ...

# # - name: "Publish To PyPi Test Server"
# # if: ${{ github.event.inputs.publish_pypi_test == 'true' }}
# # working-directory: python
# # run: |
# # echo "Publishing to PyPi Test Server"
# # poetry config repositories.pypi-test https://test.pypi.org/legacy/
# # poetry config pypi-token.pypi-test ${{ secrets.PYPI_TEST_SERVER_API_TOKEN }}
# # poetry publish -r pypi-test

# # - name: pypi-publish
# # if: ${{ github.event.inputs.publish_pypi_test == 'true' }}
# # uses: pypa/gh-action-pypi-publish@v1.4.2
# # with:
# # packages_dir: python/dist/
# # user: __token__
# # password: ${{ secrets.PYPI_TEST_SERVER_API_TOKEN }}
# # repository_url: https://test.pypi.org/legacy/
# # skip_existing: true

# # - name: "Publish To Github Releases"
# # if: ${{ github.event.inputs.publish_github_release }} == true
# # working_directory: python
# # run: |
# # echo "Publishing to Github Releases"
# # # ...

show_wheels:
needs: [build_om_linux, build_windows]
needs: [build_om_linux] #, build_windows]
runs-on: ubuntu-latest
steps:
- name: Retrieve OM Wheels
Expand Down Expand Up @@ -520,7 +520,7 @@ jobs:
path: python\origen\origen\__bin__\bin\origen.exe

publish_to_pypi_test:
needs: [build_om_linux, build_windows]
needs: [build_om_linux] #, build_windows]
runs-on: ubuntu-latest
if: ${{ github.event.inputs.publish_pypi_test == 'true' }}
steps:
Expand Down Expand Up @@ -563,7 +563,7 @@ jobs:
verbose: true

publish_to_pypi:
needs: [build_om_linux, build_windows]
needs: [build_om_linux] #, build_windows]
runs-on: ubuntu-latest
if: ${{ github.event.inputs.publish_pypi == 'true' }}
steps:
Expand Down Expand Up @@ -604,7 +604,7 @@ jobs:
verbose: true

publish_github_release:
needs: [build_om_linux, build_windows]
needs: [build_om_linux] #, build_windows]
runs-on: ubuntu-latest
if: ${{ github.event.inputs.publish_github_release == 'true' }}
steps:
Expand Down Expand Up @@ -688,7 +688,7 @@ jobs:
commit: ${{ github.sha }}
tag: ${{ env.tag }}
cleanup:
needs: [precheck, build_om_linux, build_windows, publish_to_pypi_test, publish_to_pypi, publish_github_release, show_wheels]
needs: [precheck, build_om_linux, publish_to_pypi_test, publish_to_pypi, publish_github_release, show_wheels] # , build_windows
runs-on: ubuntu-latest
if: ${{ always() }}
steps:
Expand Down

0 comments on commit ca11751

Please sign in to comment.