Skip to content

more artifact fixing #33

more artifact fixing

more artifact fixing #33

Workflow file for this run

name: Package
on:
push:
tags:
- 'v*'
jobs:
ubuntu-jammy:
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- extension_support: 0
variant_tag: "-noext"
- extension_support: 1
variant_tag: ""
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Get version tag
id: get_version
uses: battila7/get-version-action@v2
- name: Ubuntu dependencies
run: |
sudo apt update
sudo apt-get install -y software-properties-common \
build-essential \
python3-dev python3-pip python3.11-venv \
pkg-config libssl-dev libdbus-1-dev libdbus-glib-1-dev libffi-dev libkrb5-dev
- name: Build the executable
run: |
python3 -m venv venv
source venv/bin/activate
pip install ./sign_client
pip install external/okta-0.0.3.1-py2.py3-none-any.whl
pip install -e .
pip install -e .[test]
pip install -e .[setup]
make
env:
UST_EXTENSION: ${{matrix.extension_support}}
- name: Get build
run: |
cd dist
tar czf "user-sync-${UST_VERSION}${UST_VARIANT_TAG}-ubuntu_jammy.tar.gz" user-sync
env:
UST_VARIANT_TAG: ${{matrix.variant_tag}}
UST_VERSION: ${{ steps.get_version.outputs.version }}
- name: Make artifacts
uses: actions/upload-artifact@v4
with:
name: "ubuntu-jammy${{matrix.variant_tag}}"
path: dist/*.tar.gz
retention-days: 30
ubuntu-focal:
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- extension_support: 0
variant_tag: "-noext"
- extension_support: 1
variant_tag: ""
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Get version tag
id: get_version
uses: battila7/get-version-action@v2
- name: Ubuntu-Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo apt-get install -y build-essential
sudo apt-get install -y python3-dev python3-pip python3-virtualenv
sudo apt-get install -y pkg-config libssl-dev libdbus-1-dev libdbus-glib-1-dev python-dbus libffi-dev libkrb5-dev
- run: |
pip install ./sign_client
pip install external/okta-0.0.3.1-py2.py3-none-any.whl
pip install -e .
pip install -e .[test]
pip install -e .[setup]
- name: Build executable
run: make
env:
UST_EXTENSION: ${{matrix.extension_support}}
- name: Get build
run: |
cd dist
tar czf "user-sync-${UST_VERSION}${UST_VARIANT_TAG}-ubuntu_focal.tar.gz" user-sync
env:
UST_VARIANT_TAG: ${{matrix.variant_tag}}
UST_VERSION: ${{ steps.get_version.outputs.version }}
- name: Make artifacts
uses: actions/upload-artifact@v4
with:
name: "ubuntu-focal${{matrix.variant_tag}}"
path: dist/*.tar.gz
retention-days: 30
windows:
runs-on: windows-latest
strategy:
matrix:
include:
- extension_support: 0
variant_tag: "-noext"
- extension_support: 1
variant_tag: ""
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Get version tag
id: get_version
uses: battila7/get-version-action@v2
- run: |
pip install ./sign_client
pip install external/okta-0.0.3.1-py2.py3-none-any.whl
pip install -e .
pip install -e .[test]
pip install -e .[setup]
- run: make standalone
env:
UST_EXTENSION: ${{matrix.extension_support}}
- name: Get build
run: |
cd dist
7z a user-sync-${{ steps.get_version.outputs.version }}${{matrix.variant_tag}}-win64.zip user-sync.exe
- name: Make artifact
uses: actions/upload-artifact@v4
with:
name: "windows${{matrix.variant_tag}}"
path: dist/*.zip
retention-days: 30
rocky:
runs-on: ubuntu-latest
env:
LC_ALL: en_US.utf8
LANG: en_US.utf8
container:
image: ${{ matrix.container }}
strategy:
matrix:
include:
- container: "rockylinux:8"
extension_support: 0
variant_tag: "-noext"
- container: "rockylinux:8"
extension_support: 1
variant_tag: ""
- container: "rockylinux:9"
extension_support: 0
variant_tag: "-noext"
- container: "rockylinux:9"
extension_support: 1
variant_tag: ""
steps:
- uses: actions/checkout@v4
- name: Get version tag
id: get_version
uses: battila7/get-version-action@v2
- name: Update yum dependencies
run: yum update -y
- name: Rocky 8 dependencies
if: ${{ matrix.container == 'rockylinux:8' }}
run: yum install -y pkgconfig gcc openssl-devel dbus-glib-devel python3-dbus sqlite-devel libffi-devel wget make findutils glibc-langpack-en
- name: Rocky 9 dependencies
if: ${{ matrix.container == 'rockylinux:9' }}
run: yum install -y pkgconfig gcc openssl-devel dbus-glib-devel python3-dbus sqlite-devel libffi-devel krb5-devel dbus-daemon wget make findutils glibc-langpack-en
- name: Build Python 3.12
run: |
mkdir tmp && cd tmp
wget https://www.python.org/ftp/python/3.12.4/Python-3.12.4.tgz
tar xzf Python-3.12.4.tgz
cd Python-3.12.4
./configure --enable-optimizations --enable-shared --enable-loadable-sqlite-extensions
make altinstall
cd ../..
- name: Build executable
run: |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/
/usr/local/bin/python3.12 -m venv venv
source venv/bin/activate
# for some reason, pycryptodome won't install when
# setuptools is installed/upgraded, so install it before
# install/upgrade setuptools
pip install pycryptodome==3.9.7
python -m pip install --upgrade pip pyinstaller setuptools
pip install ./sign_client
pip install external/okta-0.0.3.1-py2.py3-none-any.whl
pip install -e .
pip install -e .[test]
pip install -e .[setup]
make
deactivate
env:
UST_EXTENSION: ${{matrix.extension_support}}
- name: Get build
run: |
cd dist
LABEL=$(echo $CONTAINER | sed "s/linux://g")
tar czf "user-sync-${UST_VERSION}${UST_VARIANT_TAG}-${LABEL}.tar.gz" user-sync
env:
UST_VARIANT_TAG: ${{matrix.variant_tag}}
UST_VERSION: ${{ steps.get_version.outputs.version }}
CONTAINER: ${{ matrix.container }}
- name: Make artifact
uses: actions/upload-artifact@v4
with:
name: "rocky${{matrix.variant_tag}}"
path: dist/*.tar.gz
retention-days: 30
examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: user-sync-examples-zip
run: |
cd examples
zip -r user-sync-examples.zip .
- uses: actions/upload-artifact@v4
with:
name: examples
path: examples/*.zip
retention-days: 30
- name: user-sync.tar.gz
run: |
tar -czvf "user-sync-examples.tar.gz" examples
- uses: actions/upload-artifact@v4
with:
name: examples
path: user-sync-examples.tar.gz
retention-days: 30
release:
runs-on: ubuntu-latest
needs: [rocky, ubuntu-jammy, ubuntu-focal, examples, windows]
steps:
- uses: actions/checkout@v4
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: User Sync Tool ${{ github.ref }}
body_path: .changelog/latest.md
draft: false
prerelease: false
upload-assets:
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
- name: Get version tag
id: get_version
uses: battila7/get-version-action@v2
- uses: AButler/[email protected]
with:
files: 'examples/*;ubuntu-jammy/*;ubuntu-jammy-noext/*;ubuntu-focal/*;ubuntu-focal-noext/*;rocky/*;rocky-noext/*'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ steps.get_version.outputs.version }}