Skip to content

Commit c5a3607

Browse files
committed
debugging conda workflow
1 parent 811caf1 commit c5a3607

File tree

3 files changed

+76
-40
lines changed

3 files changed

+76
-40
lines changed

.github/workflows/cron-conda.yml

Lines changed: 49 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,14 @@ on:
99
jobs:
1010
conda-update:
1111
runs-on: ubuntu-latest
12-
strategy:
13-
matrix:
14-
python-version:
15-
- "3.7"
16-
- "3.8"
17-
- "3.9"
18-
- "3.10"
19-
- "3.11"
2012
steps:
2113
- uses: actions/checkout@v3
2214
with:
2315
fetch-depth: 0
2416

2517
- uses: actions/setup-python@v4
2618
with:
27-
python-version: ${{ matrix.python-version }}
19+
python-version: '3.11'
2820

2921
- name: Install and Setup
3022
run: |
@@ -55,7 +47,7 @@ jobs:
5547
run: |
5648
git config --local user.email "github-actions[bot]@users.noreply.github.com"
5749
git config --local user.name "github-actions[bot]"
58-
git commit -am"Bumped build to $(cat conda/build)')
50+
git commit -am"Bumped build to $(cat conda/build)
5951
6052
Updated conda distribution at $(date). The following files have been changed:
6153
${{ steps.verify-changed-files.outputs.changed_files }}"
@@ -83,12 +75,53 @@ jobs:
8375
with:
8476
tag: "conda-${{ steps.get_version.outputs.PCAPKIT_VERSION }}+${{ steps.get_version.outputs.PCAPKIT_BUILD }}"
8577

78+
outputs:
79+
CONDA_CHANGED: ${{ steps.verify-changed-files.outputs.files_changed }}
80+
PCAPKIT_VERSION: ${{ steps.get_version.outputs.PCAPKIT_VERSION }}
81+
PCAPKIT_CONDA_LABEL: ${{ steps.get_version.outputs.PCAPKIT_CONDA_LABEL }}
82+
PCAPKIT_BUILD: ${{ steps.get_version.outputs.PCAPKIT_BUILD }}
83+
84+
conda-dist:
85+
runs-on: ubuntu-latest
86+
needs: [ conda-update ]
87+
if: needs.conda-update.outputs.CONDA_CHANGED == 'true'
88+
strategy:
89+
matrix:
90+
python-version:
91+
- "3.7"
92+
- "3.8"
93+
- "3.9"
94+
- "3.10"
95+
- "3.11"
96+
steps:
97+
- uses: actions/checkout@v3
98+
with:
99+
fetch-depth: 0
100+
101+
- uses: actions/setup-python@v4
102+
with:
103+
python-version: ${{ matrix.python-version }}
104+
105+
- name: Install and Setup
106+
run: |
107+
set -x
108+
109+
python -m pip install -U pip setuptools wheel
110+
python -m pip install -e .[all]
111+
python -m pip install pathlib2 typing_extensions
112+
113+
- name: Setup Conda Distribution
114+
run: |
115+
export PCAPKIT_DEVMODE=1
116+
export PCAPKIT_VERBOSE=1
117+
118+
python util/conda-dist.py
119+
86120
- name: Conda environment creation and activation
87-
if: steps.verify-changed-files.outputs.files_changed == 'true'
88121
uses: conda-incubator/setup-miniconda@v2
89122
env:
90-
PCAPKIT_VERSION: ${{ steps.get_version.outputs.PCAPKIT_VERSION }}
91-
PCAPKIT_BUILD: ${{ steps.get_version.outputs.PCAPKIT_BUILD }}
123+
PCAPKIT_VERSION: ${{ needs.conda-update.outputs.PCAPKIT_VERSION }}
124+
PCAPKIT_BUILD: ${{ needs.conda-update.outputs.PCAPKIT_BUILD }}
92125
with:
93126
python-version: ${{ matrix.python-version }}
94127
environment-file: conda/conda-build.yaml # Path to the build conda environment
@@ -97,11 +130,10 @@ jobs:
97130
show-channel-urls: true
98131

99132
- name: Build and upload the conda packages
100-
if: steps.verify-changed-files.outputs.files_changed == 'true'
101133
uses: uibcdf/action-build-and-upload-conda-packages@v1.2.0
102134
env:
103-
PCAPKIT_VERSION: ${{ steps.get_version.outputs.PCAPKIT_VERSION }}
104-
PCAPKIT_BUILD: ${{ steps.get_version.outputs.PCAPKIT_BUILD }}
135+
PCAPKIT_VERSION: ${{ needs.conda-update.outputs.PCAPKIT_VERSION }}
136+
PCAPKIT_BUILD: ${{ needs.conda-update.outputs.PCAPKIT_BUILD }}
105137
with:
106138
meta_yaml_dir: conda/pypcapkit
107139
python-version: ${{ matrix.python-version }} # Values previously defined in `matrix`
@@ -111,11 +143,10 @@ jobs:
111143
token: ${{ secrets.ANACONDA_TOKEN }} # Replace with the right name of your secret
112144

113145
- name: Upload package to GitHub Release
114-
if: steps.verify-changed-files.outputs.files_changed == 'true'
115146
uses: ncipollo/release-action@v1.12.0
116147
with:
117148
allowUpdates: true
118149
artifacts: |
119150
/tmp/compilation-*/*.tar.bz2
120-
tag: "v${{ steps.get_version.outputs.PCAPKIT_VERSION }}"
151+
tag: "v${{ needs.conda-update.outputs.PCAPKIT_VERSION }}"
121152
token: "${{ secrets.GITHUB_TOKEN }}"

conda/build

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

conda/requirements.txt

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
1-
aenum==3.1.12
2-
appdirs==1.4.4
3-
beautifulsoup4==4.12.2
4-
certifi==2023.5.7
5-
chardet==5.1.0
6-
charset-normalizer==3.1.0
71
dictdumper==0.8.4.post2
2+
3+
chardet==5.1.0
4+
aenum==3.1.12
5+
tbtrim==0.3.1
6+
7+
emoji==2.2.0
88
dpkt==1.9.8
9-
emoji==2.4.0
9+
scapy==2.5.0
10+
pyshark==0.6
11+
appdirs==1.4.4
12+
lxml==4.9.2
13+
packaging==23.1
14+
termcolor==2.3.0
15+
16+
requests==2.30.0
17+
certifi==2023.5.7
18+
charset-normalizer==3.1.0
19+
idna==3.4
20+
urllib3==2.0.2
21+
PySocks==1.7.1
22+
23+
beautifulsoup4==4.12.2
24+
soupsieve==2.4.1
1025
html5lib==1.1
11-
idna==3.4
12-
lxml==4.9.2
13-
packaging==23.1
26+
six==1.16.0
27+
webencodings==0.5.1
28+
1429
pathlib2==2.3.7.post1
15-
pyshark==0.6
16-
pysocks==1.7.1
17-
requests==2.31.0
18-
scapy==2.5.0
19-
six==1.16.0
20-
soupsieve==2.4.1
21-
tbtrim==0.3.1
22-
termcolor==2.3.0
23-
typing-extensions==4.6.3
24-
urllib3==2.0.2
25-
webencodings==0.5.1
30+
typing_extensions==4.6.3

0 commit comments

Comments
 (0)