Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
daimor committed Mar 23, 2023
1 parent 717c4e4 commit 98f84ba
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 2 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: "29 13 * * 1"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ python ]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"
11 changes: 9 additions & 2 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,15 @@ jobs:
echo ::set-output name=version::$VERSION
NAME="sqlalchemy_iris"-${VERSION}-py3-none-any
echo ::set-output name=name::$NAME
- name: Build package
run: python -m build
- name: Install requirements
run: |
pip install -U pip setuptools
pip install -r requirements-dev.txt
pip install -r requirements-iris.txt
pip install -e .
- name: Build Python package
run: ./scripts/build-dist.sh
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1.5
with:
Expand Down
1 change: 1 addition & 0 deletions requirements-iris.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://github.com/intersystems-community/intersystems-irispython/releases/download/3.4.2/intersystems_iris-3.4.2-py3-none-any.whl
34 changes: 34 additions & 0 deletions scripts/build-dist.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

packages=("iris" "intersystems_iris" "irisnative")
for package in ${packages[@]};
do
rm -f ./$package
package_path=`python -c "import importlib.util; print(importlib.util.find_spec('${package}').submodule_search_locations[0])"`
ln -s $package_path ./$package
done

set -eo pipefail

PROJECT="$( cd "$(dirname "$0")/.." ; pwd -P )"

PYTHON_BIN=${PYTHON_BIN:-python3}

echo "$PYTHON_BIN"

set -x

rm -rf "$PROJECT"/dist
rm -rf "$PROJECT"/build
mkdir -p "$PROJECT"/dist

cd "$PROJECT"
$PYTHON_BIN setup.py sdist bdist_wheel

for package in ${packages[@]};
do
rm -f $package
done
rm -rf intersystems-irispython

set +x

0 comments on commit 98f84ba

Please sign in to comment.