-
Notifications
You must be signed in to change notification settings - Fork 0
142 lines (106 loc) · 3.61 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: Release
on:
push:
jobs:
build-macos-dist:
runs-on: macos-12
outputs:
tag_message: ${{env.TAG_MESSAGE}}
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Set version number
run: echo VERSION_NUMBER=${GITHUB_REF_NAME:1} >> $GITHUB_ENV
- name: Set tag messsage
run: |
git fetch --tags --force
echo "TAG_MESSAGE=$(git tag -l --sort=-taggerdate --format='%(contents)' $(git describe --tags $(git branch --show-current) ))" >> $GITHUB_ENV
- name: Build GenomicsDB python distribution
shell: bash
working-directory: ${{github.workspace}}/package
run: ./publish_package_local.sh
- name: Archive macos python distribution as Artifact
uses: actions/upload-artifact@v3
with:
name: macos-dist-$VERSION_NUMBER
path: dist
build-linux-dist:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Set version number
run: |
echo VERSION_NUMBER=${GITHUB_REF_NAME:1} >> $GITHUB_ENV
echo USER_ID=$(id -u) >> $GITHUB_ENV
echo GROUP_ID=$(id -g) >> $GITHUB_ENV
chmod -R a+w .
sudo apt-get update -q && sudo apt install -y libcurl4-openssl-dev curl libssl-dev
- name: Build docker image with GenomicsDB and Python
uses: docker/build-push-action@v5
with:
file: package/Dockerfile
tags: genomicsdb:python
context: package
build-args: genomicsdb_branch=develop
- name: Build GenomicsDB linux distribution
shell: bash
working-directory: ${{github.workspace}}/package
run: ./publish_package.sh test-release linux
- name: Archive linux python distribution as Artifact
uses: actions/upload-artifact@v3
with:
name: ubuntu-dist-$VERSION_NUMBER
path: dist
#publish:
#runs-on: ubuntu-22.04
#needs: [build-macos-dist, build-linux-dist]
#steps:
#- name: Download macos distribution archive
#uses: actions/download-artifact@v3
#with:
#name: macos-dist-$VERSION_NUMBER
#- name: Download ubuntu distribution archive
#uses: actions/download-artifact@v3
#with:
#name: ubuntu-dist-$VERSION_NUMBER
#- name: Release
#run: twine upload -r testpypi -u "__TOKEN__" -p {{secrets.TESTPYPI}}
test:
#needs: [publish]
needs: [build-linux-dist]
runs-on: ubuntu-22.04
strategy:
fail-fast: true
matrix:
python-version: ["3.11"]
steps:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
- name: Download ubuntu distribution archive
uses: actions/download-artifact@v3
with:
name: ubuntu-dist-$VERSION_NUMBER
- name: Install package
run: |
pip install $(find genomicsdb-*-cp311*.whl) || python -m pip install $(find genomicsdb-*-cp311*.whl)
pip show genomicsdb || python -m pip show genomicsdb
- name: Run test
run: |
echo test will run here after making sure