Skip to content

Commit 98f84ba

Browse files
committed
update ci
1 parent 717c4e4 commit 98f84ba

File tree

4 files changed

+85
-2
lines changed

4 files changed

+85
-2
lines changed

.github/workflows/codeql.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
schedule:
9+
- cron: "29 13 * * 1"
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: ubuntu-latest
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language: [ python ]
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v3
28+
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@v2
31+
with:
32+
languages: ${{ matrix.language }}
33+
queries: +security-and-quality
34+
35+
- name: Autobuild
36+
uses: github/codeql-action/autobuild@v2
37+
38+
- name: Perform CodeQL Analysis
39+
uses: github/codeql-action/analyze@v2
40+
with:
41+
category: "/language:${{ matrix.language }}"

.github/workflows/python-publish.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,15 @@ jobs:
4040
echo ::set-output name=version::$VERSION
4141
NAME="sqlalchemy_iris"-${VERSION}-py3-none-any
4242
echo ::set-output name=name::$NAME
43-
- name: Build package
44-
run: python -m build
43+
- name: Install requirements
44+
run: |
45+
pip install -U pip setuptools
46+
pip install -r requirements-dev.txt
47+
pip install -r requirements-iris.txt
48+
pip install -e .
49+
50+
- name: Build Python package
51+
run: ./scripts/build-dist.sh
4552
- name: Publish package
4653
uses: pypa/gh-action-pypi-publish@release/v1.5
4754
with:

requirements-iris.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://github.com/intersystems-community/intersystems-irispython/releases/download/3.4.2/intersystems_iris-3.4.2-py3-none-any.whl

scripts/build-dist.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
3+
packages=("iris" "intersystems_iris" "irisnative")
4+
for package in ${packages[@]};
5+
do
6+
rm -f ./$package
7+
package_path=`python -c "import importlib.util; print(importlib.util.find_spec('${package}').submodule_search_locations[0])"`
8+
ln -s $package_path ./$package
9+
done
10+
11+
set -eo pipefail
12+
13+
PROJECT="$( cd "$(dirname "$0")/.." ; pwd -P )"
14+
15+
PYTHON_BIN=${PYTHON_BIN:-python3}
16+
17+
echo "$PYTHON_BIN"
18+
19+
set -x
20+
21+
rm -rf "$PROJECT"/dist
22+
rm -rf "$PROJECT"/build
23+
mkdir -p "$PROJECT"/dist
24+
25+
cd "$PROJECT"
26+
$PYTHON_BIN setup.py sdist bdist_wheel
27+
28+
for package in ${packages[@]};
29+
do
30+
rm -f $package
31+
done
32+
rm -rf intersystems-irispython
33+
34+
set +x

0 commit comments

Comments
 (0)