|
8 | 8 |
|
9 | 9 | jobs:
|
10 | 10 | build:
|
11 |
| - name: Build on ${{ matrix.platform || matrix.os }} (${{ matrix.target }} - ${{ 'auto' }}) |
| 11 | + runs-on: ${{ matrix.os }}-latest |
12 | 12 | strategy:
|
13 | 13 | fail-fast: false
|
14 | 14 | 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"] |
37 | 16 |
|
38 |
| - runs-on: ${{ matrix.os }}-latest |
39 | 17 | 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 |
44 | 21 | with:
|
45 |
| - python-version: '3.10.12' |
46 |
| - architecture: ${{ matrix.python-architecture || 'x64' }} |
| 22 | + ref: ${{ github.sha }} |
47 | 23 |
|
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] |
64 | 27 |
|
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 |
70 | 30 | uses: actions/setup-python@v4
|
71 | 31 | 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" |
90 | 33 |
|
| 34 | + - name: Install Poetry |
| 35 | + id: install_poetry |
| 36 | + uses: snok/install-poetry@v1 |
91 | 37 |
|
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 |
96 | 41 |
|
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 |
100 | 45 |
|
101 |
| - - name: Download artifacts |
102 |
| - uses: actions/download-artifact@v3 |
| 46 | + - uses: actions/upload-artifact@v3 |
103 | 47 | with:
|
104 | 48 | name: dist
|
105 | 49 | 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 |
0 commit comments