Skip to content

Commit e5fe80d

Browse files
author
Michael Arbel
committed
ci bugs fixed!
1 parent 15b4c64 commit e5fe80d

File tree

2 files changed

+140
-140
lines changed

2 files changed

+140
-140
lines changed

.github/workflows/main.yml

Lines changed: 139 additions & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -7,162 +7,162 @@ on:
77
- 'develop'
88

99
jobs:
10-
# lint_code:
11-
# runs-on: ubuntu-latest
12-
# steps:
13-
# - uses: actions/checkout@v3
14-
# - name: Set up Python 3.9
15-
# uses: actions/setup-python@v3
16-
# with:
17-
# python-version: 3.9
18-
# - name: Install dependencies
19-
# run: |
20-
# python -m pip install --upgrade pip
21-
# pip install flake8
22-
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
23-
# - name: Lint with flake8
24-
# run: |
25-
# flake8 mlxp --count --select=E9,F63,F7,F82 --show-source --statistics
26-
# build_wheels:
27-
# needs: [lint_code]
28-
# name: Build wheels on ${{ matrix.os }}
29-
# runs-on: ${{ matrix.os }}
30-
# strategy:
31-
# matrix:
32-
# os: [macos-latest, windows-latest, ubuntu-latest]
33-
# #os: [ubuntu-latest]
10+
lint_code:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Python 3.9
15+
uses: actions/setup-python@v3
16+
with:
17+
python-version: 3.9
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install flake8
22+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
23+
- name: Lint with flake8
24+
run: |
25+
flake8 mlxp --count --select=E9,F63,F7,F82 --show-source --statistics
26+
build_wheels:
27+
needs: [lint_code]
28+
name: Build wheels on ${{ matrix.os }}
29+
runs-on: ${{ matrix.os }}
30+
strategy:
31+
matrix:
32+
os: [macos-latest, windows-latest, ubuntu-latest]
33+
#os: [ubuntu-latest]
3434

35-
# steps:
36-
# - uses: actions/checkout@v3
35+
steps:
36+
- uses: actions/checkout@v3
3737

38-
# - uses: actions/setup-python@v3
38+
- uses: actions/setup-python@v3
3939

40-
# - name: Install pypa/build
41-
# run: python -m pip install build --user
42-
# - name: Build a binary wheel and a source tarball
43-
# run: python -m build --sdist --wheel --outdir wheelhouse/
44-
# # - name: Build wheels
45-
# # run: python -m pip wheel --wheel-dir=wheelhouse mlxp
40+
- name: Install pypa/build
41+
run: python -m pip install build --user
42+
- name: Build a binary wheel and a source tarball
43+
run: python -m build --sdist --wheel --outdir wheelhouse/
44+
# - name: Build wheels
45+
# run: python -m pip wheel --wheel-dir=wheelhouse mlxp
4646

47-
# - uses: actions/upload-artifact@v3
48-
# with:
49-
# path: ./wheelhouse/*.whl
47+
- uses: actions/upload-artifact@v3
48+
with:
49+
path: ./wheelhouse/*.whl
5050

51-
# build_sdist:
52-
# if: startsWith(github.ref, 'refs/heads/release/')
53-
# needs: [lint_code]
54-
# name: Build source distribution
55-
# runs-on: ubuntu-latest
56-
# steps:
57-
# - uses: actions/checkout@v3
51+
build_sdist:
52+
if: startsWith(github.ref, 'refs/heads/release/')
53+
needs: [lint_code]
54+
name: Build source distribution
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v3
5858

59-
# - name: Set version
60-
# run: echo "PACKAGE_VERSION=$(cat VERSION)" >> $GITHUB_ENV
59+
- name: Set version
60+
run: echo "PACKAGE_VERSION=$(cat VERSION)" >> $GITHUB_ENV
6161

62-
# - uses: actions/setup-python@v3
63-
# name: Install Python
64-
# with:
65-
# python-version: 3.9
66-
# # - name: Build sdist
67-
# # run: python setup.py sdist
62+
- uses: actions/setup-python@v3
63+
name: Install Python
64+
with:
65+
python-version: 3.9
66+
# - name: Build sdist
67+
# run: python setup.py sdist
6868

69-
# - name: Install pypa/build
70-
# run: python -m pip install build --user
71-
# - name: Build a binary wheel and a source tarball
72-
# run: python -m build --sdist --outdir dist/
69+
- name: Install pypa/build
70+
run: python -m pip install build --user
71+
- name: Build a binary wheel and a source tarball
72+
run: python -m build --sdist --outdir dist/
7373

74-
# - uses: actions/upload-artifact@v3
75-
# with:
76-
# path: dist/*.tar.gz
74+
- uses: actions/upload-artifact@v3
75+
with:
76+
path: dist/*.tar.gz
7777

78-
# - name: version
79-
# run: echo "::set-output name=version::${{ env.PACKAGE_VERSION }}"
80-
# id: version
81-
# - name: release
82-
# uses: actions/create-release@v1
83-
# id: create_release
84-
# with:
85-
# draft: false
86-
# prerelease: false
87-
# release_name: ${{ steps.version.outputs.version }}
88-
# tag_name: ${{ steps.version.outputs.version }}
89-
# body_path: CHANGELOG.md
90-
# env:
91-
# GITHUB_TOKEN: ${{ github.token }}
92-
# - name: upload zip archive
93-
# #uses: actions/upload-release-asset@v1
94-
# uses: softprops/action-gh-release@v1
95-
# env:
96-
# GITHUB_TOKEN: ${{ github.token }}
97-
# with:
98-
# tag_name: ${{ steps.version.outputs.version }}
99-
# upload_url: ${{ steps.create_release.outputs.upload_url }}
100-
# asset_path: dist/MLXP-${{ env.PACKAGE_VERSION }}.zip
101-
# asset_name: MLXP-${{ env.PACKAGE_VERSION }}.zip
102-
# asset_content_type: application/zip
103-
# - name: upload targz archive
104-
# uses: softprops/action-gh-release@v1
105-
# env:
106-
# GITHUB_TOKEN: ${{ github.token }}
107-
# with:
108-
# tag_name: ${{ steps.version.outputs.version }}
109-
# upload_url: ${{ steps.create_release.outputs.upload_url }}
110-
# asset_path: dist/MLXP-${{ env.PACKAGE_VERSION }}.tar.gz
111-
# asset_name: MLXP-${{ env.PACKAGE_VERSION }}.tar.gz
112-
# asset_content_type: application/gzip
78+
- name: version
79+
run: echo "::set-output name=version::${{ env.PACKAGE_VERSION }}"
80+
id: version
81+
- name: release
82+
uses: actions/create-release@v1
83+
id: create_release
84+
with:
85+
draft: false
86+
prerelease: false
87+
release_name: ${{ steps.version.outputs.version }}
88+
tag_name: ${{ steps.version.outputs.version }}
89+
body_path: CHANGELOG.md
90+
env:
91+
GITHUB_TOKEN: ${{ github.token }}
92+
- name: upload zip archive
93+
#uses: actions/upload-release-asset@v1
94+
uses: softprops/action-gh-release@v1
95+
env:
96+
GITHUB_TOKEN: ${{ github.token }}
97+
with:
98+
tag_name: ${{ steps.version.outputs.version }}
99+
upload_url: ${{ steps.create_release.outputs.upload_url }}
100+
asset_path: dist/MLXP-${{ env.PACKAGE_VERSION }}.zip
101+
asset_name: MLXP-${{ env.PACKAGE_VERSION }}.zip
102+
asset_content_type: application/zip
103+
- name: upload targz archive
104+
uses: softprops/action-gh-release@v1
105+
env:
106+
GITHUB_TOKEN: ${{ github.token }}
107+
with:
108+
tag_name: ${{ steps.version.outputs.version }}
109+
upload_url: ${{ steps.create_release.outputs.upload_url }}
110+
asset_path: dist/MLXP-${{ env.PACKAGE_VERSION }}.tar.gz
111+
asset_name: MLXP-${{ env.PACKAGE_VERSION }}.tar.gz
112+
asset_content_type: application/gzip
113113

114-
# run_tests:
115-
# needs: [build_wheels]
116-
# name: Run the tests on ${{ matrix.os }}
117-
# runs-on: ${{ matrix.os }}
118-
# strategy:
119-
# matrix:
120-
# os: [macos-latest, ubuntu-latest, windows-latest]
121-
# #os: [ubuntu-latest]
122-
# python-version: ['3.8', '3.9', '3.10', '3.11']
123-
# #python-version: ['3.9']
124-
# steps:
125-
# - uses: actions/download-artifact@v3
126-
# with:
127-
# name: artifact
128-
# path: dist
114+
run_tests:
115+
needs: [build_wheels]
116+
name: Run the tests on ${{ matrix.os }}
117+
runs-on: ${{ matrix.os }}
118+
strategy:
119+
matrix:
120+
os: [macos-latest, ubuntu-latest, windows-latest]
121+
#os: [ubuntu-latest]
122+
python-version: ['3.8', '3.9', '3.10', '3.11']
123+
#python-version: ['3.9']
124+
steps:
125+
- uses: actions/download-artifact@v3
126+
with:
127+
name: artifact
128+
path: dist
129129

130-
# - name: Set up Python
131-
# uses: actions/setup-python@v3
132-
# with:
133-
# python-version: ${{ matrix.python-version }}
130+
- name: Set up Python
131+
uses: actions/setup-python@v3
132+
with:
133+
python-version: ${{ matrix.python-version }}
134134

135-
# - name: Try to import mlxp
136-
# run: python -m pip install --find-links dist MLXP && python -c "import mlxp;"
135+
- name: Try to import mlxp
136+
run: python -m pip install --find-links dist MLXP && python -c "import mlxp;"
137137

138-
# - name: Checkout
139-
# uses: actions/checkout@v3
140-
# with:
141-
# fetch-depth: 0
138+
- name: Checkout
139+
uses: actions/checkout@v3
140+
with:
141+
fetch-depth: 0
142142

143-
# - name: Switch to Current Branch
144-
# run: git checkout ${{ env.BRANCH }}
143+
- name: Switch to Current Branch
144+
run: git checkout ${{ env.BRANCH }}
145145

146-
# - name: Run tests without the lib
147-
# uses: knicknic/[email protected]
148-
# with:
149-
# macos: rm -rf MLXP && python -m pip install pytest && cd tests && python -m pytest
150-
# linux: rm -rf MLXP && python -m pip install pytest && cd tests && python -m pytest
151-
# windows: Remove-Item -Force -Recurse MLXP && python -m pip install pytest && cd tests && python -m pytest
146+
- name: Run tests without the lib
147+
uses: knicknic/[email protected]
148+
with:
149+
macos: rm -rf MLXP && python -m pip install pytest && cd tests && python -m pytest
150+
linux: rm -rf MLXP && python -m pip install pytest && cd tests && python -m pytest
151+
windows: Remove-Item -Force -Recurse MLXP && python -m pip install pytest && cd tests && python -m pytest
152152

153-
# upload_pypi:
154-
# if: startsWith(github.ref, 'refs/heads/release/')
155-
# needs: [build_wheels, build_sdist, run_tests]
156-
# runs-on: ubuntu-latest
157-
# steps:
158-
# - uses: actions/download-artifact@v3
159-
# with:
160-
# name: artifact
161-
# path: dist
162-
# - name: Publish distribution 📦 to PyPI
163-
# uses: pypa/gh-action-pypi-publish@release/v1
164-
# with:
165-
# password: ${{ secrets.PYPI_API_TOKEN }}
153+
upload_pypi:
154+
if: startsWith(github.ref, 'refs/heads/release/')
155+
needs: [build_wheels, build_sdist, run_tests]
156+
runs-on: ubuntu-latest
157+
steps:
158+
- uses: actions/download-artifact@v3
159+
with:
160+
name: artifact
161+
path: dist
162+
- name: Publish distribution 📦 to PyPI
163+
uses: pypa/gh-action-pypi-publish@release/v1
164+
with:
165+
password: ${{ secrets.PYPI_API_TOKEN }}
166166

167167
update-master:
168168
runs-on: ubuntu-latest

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.6
1+
0.2.7

0 commit comments

Comments
 (0)