Skip to content

Commit 28438f3

Browse files
committed
new publish workflow
1 parent c14d885 commit 28438f3

2 files changed

Lines changed: 52 additions & 46 deletions

File tree

.github/workflows/publish.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Publishing on PyPi
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
publish:
8+
name: Publish Python 🐍 distributions 📦 to TestPyPI
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@master
12+
- id: cache
13+
uses: actions/cache@v1
14+
with:
15+
path: ~/scorep
16+
key: scorep
17+
18+
- name: Set up Python 3.7
19+
uses: actions/setup-python@v1
20+
with:
21+
python-version: 3.7
22+
- name: Check Version
23+
run: test ${{ github.event.release.tag_name }} = python -c "import scorep._version; print(scorep._version.__version__)"
24+
- name: Install system dependencies
25+
run: sudo apt install gcc-7-plugin-dev libopenmpi-dev openmpi-bin
26+
- name: Install dependencies
27+
if: steps.cache.outputs.cache-hit != 'true'
28+
run: |
29+
mkdir /tmp/buildScorep && cd /tmp/buildScorep
30+
wget https://www.vi-hps.org/cms/upload/packages/scorep/scorep-6.0.tar.gz
31+
tar xf scorep-6.0.tar.gz
32+
cd scorep-6.0
33+
mkdir build && cd build
34+
../configure --enable-shared --prefix=$HOME/scorep
35+
make -j3 && make install
36+
- name: Setup environment
37+
run: echo "$HOME/scorep/bin" >> $GITHUB_PATH
38+
39+
- name: Install pypa/build
40+
run: >-
41+
python -m
42+
pip install build --user
43+
- name: Build a binary wheel and a source tarball
44+
run: >-
45+
python -m
46+
build --sdist --outdir dist/ .
47+
- name: Publish distribution 📦 to Test PyPI
48+
uses: pypa/gh-action-pypi-publish@master
49+
with:
50+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
51+
repository_url: https://test.pypi.org/legacy/

.github/workflows/unit_tests.yml

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -53,49 +53,4 @@ jobs:
5353
run: pip install .
5454
- name: Run tests
5555
working-directory: test
56-
run: pytest
57-
58-
publish:
59-
name: Publish Python 🐍 distributions 📦 to TestPyPI
60-
needs: [build]
61-
runs-on: ubuntu-latest
62-
steps:
63-
- uses: actions/checkout@master
64-
- id: cache
65-
uses: actions/cache@v1
66-
with:
67-
path: ~/scorep
68-
key: scorep
69-
70-
- name: Install system dependencies
71-
run: sudo apt install gcc-7-plugin-dev libopenmpi-dev openmpi-bin
72-
- name: Install dependencies
73-
if: steps.cache.outputs.cache-hit != 'true'
74-
run: |
75-
mkdir /tmp/buildScorep && cd /tmp/buildScorep
76-
wget https://www.vi-hps.org/cms/upload/packages/scorep/scorep-6.0.tar.gz
77-
tar xf scorep-6.0.tar.gz
78-
cd scorep-6.0
79-
mkdir build && cd build
80-
../configure --enable-shared --prefix=$HOME/scorep
81-
make -j3 && make install
82-
- name: Setup environment
83-
run: echo "$HOME/scorep/bin" >> $GITHUB_PATH
84-
85-
- name: Set up Python 3.7
86-
uses: actions/setup-python@v1
87-
with:
88-
python-version: 3.7
89-
- name: Install pypa/build
90-
run: >-
91-
python -m
92-
pip install build --user
93-
- name: Build a binary wheel and a source tarball
94-
run: >-
95-
python -m
96-
build --sdist --outdir dist/ .
97-
- name: Publish distribution 📦 to Test PyPI
98-
uses: pypa/gh-action-pypi-publish@master
99-
with:
100-
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
101-
repository_url: https://test.pypi.org/legacy/
56+
run: pytest

0 commit comments

Comments
 (0)