Skip to content

Commit

Permalink
Use a matrix of python versions to produce multiple packages
Browse files Browse the repository at this point in the history
  • Loading branch information
nothingface0 committed Jan 22, 2024
1 parent 0302ad4 commit 548f9cc
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/build_installation_package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ on: [push]
jobs:
build_and_upload:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.6", "3.8"]
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Download and compress dependencies
env:
DMWM_GIT_URL: ${{ vars.DMWM_GIT_URL }}
Expand All @@ -19,16 +25,17 @@ jobs:
ROOT_GIT_URL: ${{ vars.ROOT_GIT_URL }}
ROOT_GIT_TAG: ${{ vars.ROOT_GIT_TAG }}
run: |
export RELEASE_TAG=deployment_${DMWM_GIT_TAG}_dqmgui_${DQMGUI_GIT_TAG}_root_${ROOT_GIT_TAG}
export DQMGUI_PYTHON_VERSION=$($(which python3) -c 'import platform; print(platform.python_version())')
export RELEASE_TAG=python_${DQMGUI_PYTHON_VERSION}_deployment_${DMWM_GIT_TAG}_dqmgui_${DQMGUI_GIT_TAG}_root_${ROOT_GIT_TAG}
sudo apt update && sudo apt install -y libcurl4-gnutls-dev
$(which python3) --version
bash download_dependencies.sh DMWM_GIT_TAG=$DMWM_GIT_TAG DMWM_GIT_URL=$DMWM_GIT_URL DQMGUI_GIT_TAG=$DQMGUI_GIT_TAG ROOT_GIT_URL=$ROOT_GIT_URL ROOT_GIT_TAG=$ROOT_GIT_TAG
bash download_dependencies.sh PYTHON_VERSION=$DQMGUI_PYTHON_VERSION DMWM_GIT_TAG=$DMWM_GIT_TAG DMWM_GIT_URL=$DMWM_GIT_URL DQMGUI_GIT_TAG=$DQMGUI_GIT_TAG ROOT_GIT_URL=$ROOT_GIT_URL ROOT_GIT_TAG=$ROOT_GIT_TAG
bash build_installation_package.sh TARGET_DIRECTORY="/tmp/dqmgui" ARCHIVE_NAME="dqmgui_$RELEASE_TAG.tar.gz"
echo "Automatically generated release for making the installation package publicly available.
The release name currently follows the convention:
deployment\_\`DMWM_GIT_TAG\`\_dqmgui\_\`DQMGUI_GIT_TAG\`\_root\_\`ROOT_GIT_TAG\`
python\_\`Python version\`\_deployment\_\`DMWM_GIT_TAG\`\_dqmgui\_\`DQMGUI_GIT_TAG\`\_root\_\`ROOT_GIT_TAG\`
Used repositories:
Expand All @@ -38,6 +45,8 @@ jobs:
* ROOT ([${ROOT_GIT_TAG}](${ROOT_GIT_URL}/tree/${ROOT_GIT_TAG}))
* Python $($(which python3) -c 'import platform; print(platform.python_version())')
" >> /tmp/release_body.md
echo "RELEASE_TAG=${RELEASE_TAG}" >> $GITHUB_ENV
- name: Archive package artifact
Expand Down

0 comments on commit 548f9cc

Please sign in to comment.