Skip to content

Commit

Permalink
github actions: clenaup build-and-deploy jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBubel committed Jul 23, 2024
1 parent 0833966 commit aa49220
Showing 1 changed file with 3 additions and 78 deletions.
81 changes: 3 additions & 78 deletions .github/workflows/test-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
pytest GPy/testing
build-windows:
# if: github.event_name == 'release'
if: github.event_name == 'release'
strategy:
matrix:
os: [windows-latest]
Expand Down Expand Up @@ -143,7 +143,7 @@ jobs:
path: dist

build-macos:
# if: github.event_name == 'release'
if: github.event_name == 'release'
strategy:
matrix:
os: [macos-latest]
Expand Down Expand Up @@ -175,7 +175,7 @@ jobs:
path: dist/*

build-linux:
# if: github.event_name == 'release'
if: github.event_name == 'release'
strategy:
matrix:
python: ['cp39-cp39', 'cp310-cp310', 'cp311-cp311', 'cp312-cp312']
Expand Down Expand Up @@ -226,81 +226,6 @@ jobs:
name: dist-artifacts-manylinux-${{ matrix.python }}
path: ${{ steps.get-wheel-name.outputs.wheel-name }}

deploy-test:
runs-on: ubuntu-latest
needs: [test-windows, test-linux, test-macos, build-linux, build-windows, build-macos]
# if: github.event_name == 'release'
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Install twine
run: |
pip install --upgrade pip
pip install twine
- name: Download all artifacts to a specific directory
uses: actions/download-artifact@v3
with:
path: dist

- name: List all downloaded artifacts
run: |
echo "Listing all downloaded artifacts:"
ls -lh dist
- name: Create dist directory
run: mkdir -p dist

- name: List tar files before extraction
run: |
echo "Listing all tar files before extraction:"
find dist -name "*.tar.gz"
- name: Extract tar.gz files
run: |
for artifact in dist/*; do
if [[ "$artifact" == *.tar.gz ]]; then
echo "Extracting $artifact"
tar -tzf "$artifact"
tar -xzf "$artifact" -C dist
rm "$artifact"
fi
done
- name: Inspect wheel files
run: |
ls -R dist
- name: Move files from subdirectories
run: |
for subdirectory in dist/*/; do
dir_name=$(basename "$subdirectory")
mv "$subdirectory"* dist/
rm -r "$subdirectory"
echo "Moved files from '$dir_name' to 'dist/'"
done
- name: Move files from subdirectories
run: |
for subdirectory in dist/*/; do
if [ -d "$subdirectory" ]; then
dir_name=$(basename "$subdirectory")
mv "$subdirectory"* dist/
rm -r "$subdirectory"
echo "Moved files from '$dir_name' to 'dist/'"
fi
done
- name: Inspect wheel files
run: |
ls -R dist
deploy:
runs-on: ubuntu-latest
needs: [test-windows, test-linux, test-macos, build-linux, build-windows, build-macos]
Expand Down

0 comments on commit aa49220

Please sign in to comment.