Skip to content

Commit 8961cce

Browse files
authored
Merge pull request #5 from thunderock/suport_macos
run tests on macos
2 parents 2731f95 + cea8938 commit 8961cce

File tree

5 files changed

+167
-268
lines changed

5 files changed

+167
-268
lines changed

.github/workflows/release.yml

Lines changed: 22 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -8,148 +8,42 @@ on:
88

99
jobs:
1010
build:
11-
name: Build on ${{ matrix.platform || matrix.os }} (${{ matrix.target }} - ${{ 'auto' }})
11+
runs-on: ${{ matrix.os }}-latest
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
os: [ ubuntu]
16-
target: [ x86_64, aarch64 ]
17-
manylinux: [ auto ]
18-
include:
19-
- os: ubuntu
20-
platform: linux
21-
target: x86_64
22-
interpreter: 3.10.12
23-
- os: ubuntu
24-
platform: linux
25-
target: aarch64
26-
- os: ubuntu
27-
platform: linux
28-
target: ppc64le
29-
interpreter: 3.10.12
30-
- os: ubuntu
31-
platform: linux
32-
interpreter: 3.10.12
33-
- os: ubuntu
34-
platform: linux
35-
target: s390x
36-
interpreter: 3.10.12
15+
os: ["ubuntu", "macos"]
3716

38-
runs-on: ${{ matrix.os }}-latest
3917
steps:
40-
- uses: actions/checkout@v4
41-
42-
- name: set up python
43-
uses: actions/setup-python@v4
18+
- name: Checkout GraphML
19+
id: checkout_graphml
20+
uses: actions/checkout@v3
4421
with:
45-
python-version: '3.10.12'
46-
architecture: ${{ matrix.python-architecture || 'x64' }}
22+
ref: ${{ github.sha }}
4723

48-
- name: setup poetry
49-
run: |
50-
python -m pip install --upgrade pip
51-
python -m pip install poetry
52-
poetry config virtualenvs.create false
53-
54-
- name: build wheels
55-
run: |
56-
poetry build -f wheel
57-
58-
- run: ${{ matrix.ls || 'ls -lh' }} dist/
59-
60-
- uses: actions/upload-artifact@v3
61-
with:
62-
name: dist
63-
path: dist
24+
- name: Get short SHA
25+
id: get_short_sha
26+
uses: benjlevesque/[email protected]
6427

65-
build_sdist:
66-
runs-on: ubuntu-latest
67-
steps:
68-
- uses: actions/checkout@v3
69-
- name: set up python
28+
- name: Install Python
29+
id: install_python
7030
uses: actions/setup-python@v4
7131
with:
72-
python-version: '3.10.12'
73-
architecture: ${{ matrix.python-architecture || 'x64' }}
74-
75-
- name: setup poetry
76-
run: |
77-
python -m pip install --upgrade pip
78-
python -m pip install poetry
79-
poetry config virtualenvs.create false
80-
81-
- name: Build sdist
82-
run: |
83-
poetry build -f sdist
84-
85-
- name: Upload sdist
86-
uses: actions/upload-artifact@v3
87-
with:
88-
name: dist
89-
path: dist
32+
python-version: "3.10"
9033

34+
- name: Install Poetry
35+
id: install_poetry
36+
uses: snok/install-poetry@v1
9137

92-
Release:
93-
needs: [ build, build_sdist ]
94-
if: ${{ needs.build.result == 'success' && needs.build_sdist.result == 'success' }} && startsWith(github.ref, 'refs/tags/')
95-
runs-on: ubuntu-latest
38+
- name: Install Dependencies
39+
id: install_dependencies
40+
run: poetry install --with main
9641

97-
steps:
98-
- name: Checkout code
99-
uses: actions/checkout@v2
42+
- name: Build release
43+
id: build_release
44+
run: poetry build -f wheel
10045

101-
- name: Download artifacts
102-
uses: actions/download-artifact@v3
46+
- uses: actions/upload-artifact@v3
10347
with:
10448
name: dist
10549
path: dist
106-
107-
- name: Install Poetry
108-
run: |
109-
curl -fsS https://install.python-poetry.org | python - -y
110-
111-
- name: Update PATH
112-
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
113-
114-
- name: Check distributions
115-
run: |
116-
ls -la dist
117-
118-
- name: Check Version
119-
id: check-version
120-
run: |
121-
[[ "${GITHUB_REF#refs/tags/}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] \
122-
|| echo ::set-output name=prerelease::true
123-
124-
- name: Set tag
125-
id: set-tag
126-
run: |
127-
echo ::set-output name=tag::$(ls dist/*.tar.gz | sed -n 's/.*graph_ml-\(.*\).tar.gz/\1/p')
128-
129-
- name: Print TAG
130-
run: echo "v${{ steps.set-tag.outputs.tag }}"
131-
132-
- name: Delete older release assets
133-
uses: mknejp/delete-release-assets@v1
134-
with:
135-
token: ${{ secrets.GITHUB_TOKEN }}
136-
tag: "v${{ steps.set-tag.outputs.tag }}"
137-
fail-if-no-assets: false
138-
fail-if-no-release: false
139-
assets: |
140-
*.tar.gz
141-
*.whl
142-
*.zip
143-
144-
- name: Create Release
145-
uses: ncipollo/release-action@v1
146-
with:
147-
artifacts: "dist/*"
148-
token: ${{ secrets.GITHUB_TOKEN }}
149-
draft: false
150-
tag: "v${{ steps.set-tag.outputs.tag }}"
151-
skipIfReleaseExists: false
152-
replacesArtifacts: true
153-
prerelease: steps.check-version.outputs.prerelease == 'true'
154-
makeLatest: true
155-
allowUpdates: true

.github/workflows/tests.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/checkout@v3
1717
- uses: actions/setup-python@v4
1818
with:
19-
python-version: "3.10.12"
19+
python-version: "3.10"
2020
- name: "Install pre-commit"
2121
run: pip install pre-commit
2222
- run: pre-commit run --all-files
@@ -26,8 +26,9 @@ jobs:
2626
runs-on: ${{ matrix.os }}-latest
2727
strategy:
2828
matrix:
29-
os: [Ubuntu]
30-
python-version: ["3.10.12"]
29+
os: [Ubuntu, MacOS]
30+
python-version: ["3.10"]
31+
bits: [64]
3132
defaults:
3233
run:
3334
shell: bash

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.10.12
1+
3.10

0 commit comments

Comments
 (0)