Skip to content

Commit

Permalink
various stuff: simplify remove; try fix build one
Browse files Browse the repository at this point in the history
  • Loading branch information
andiwand committed Dec 28, 2024
1 parent d9263d9 commit c3cd354
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 25 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ on:
type: boolean
default: false

run-name: Build all packages

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
Expand Down Expand Up @@ -52,6 +54,7 @@ jobs:
run: python scripts/list_package_references.py
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
GITHUB_INPUT: ${{ toJson(inputs) }}

build:
if: ${{ needs.generate-matrix.outputs.packages != '[]' && needs.generate-matrix.outputs.packages != '' }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build_one.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ on:
ARTIFACTORY:
required: true

run-name: Build ${{ inputs.conanfile }} version ${{ inputs.package_version }}

jobs:
generate-matrix:
runs-on: ubuntu-24.04
Expand All @@ -43,8 +45,10 @@ jobs:
run: python scripts/list_build_matrix.py
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
GITHUB_INPUT: ${{ toJson(inputs) }}

build:
if: ${{ needs.generate-matrix.outputs.matrix != '[]' && needs.generate-matrix.outputs.matrix != '' }}
name : ${{ matrix.config.host_profile }}
needs:
- generate-matrix
Expand Down
26 changes: 4 additions & 22 deletions .github/workflows/remove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,9 @@ on:
workflow_dispatch:
inputs:
package_name:
description: Package name
type: choice
options:
- all
- odrcore
- pdf2htmlex
- fontforge
- poppler
- poppler-data
- cairo
- openlibm
- fontconfig
- glib
- tmpfile
- libgsf
- libwmf
- wvware
description: Package name pattern
type: string
default: "*"

run-name: Remove ${{ inputs.package_name }} from artifactory

Expand All @@ -36,8 +22,4 @@ jobs:
- run: conan remote add odr https://artifactory.opendocument.app/artifactory/api/conan/conan
- run: conan remote login odr admin --password ${{ secrets.ARTIFACTORY }}

- run: conan remove --remote=odr "${{ github.event.inputs.package_name }}/*#*" --confirm
if: ${{ github.event.inputs.package_name != 'all' }}

- run: conan remove --remote=odr '*' --confirm
if: ${{ github.event.inputs.package_name == 'all' }}
- run: conan remove --remote=odr "${{ github.event.inputs.package_name }}" --confirm
4 changes: 2 additions & 2 deletions scripts/list_build_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ def get_cli_args():


def get_github_args():
event = json.loads(os.environ.get("GITHUB_CONTEXT", "{}"))
inputs = event.get("inputs", {})
github = json.loads(os.environ.get("GITHUB_CONTEXT", "{}"))
inputs = json.loads(os.environ.get("GITHUB_INPUT", "{}"))

conanfile = inputs.get("conanfile")
version = inputs.get("package_version")
Expand Down
3 changes: 2 additions & 1 deletion scripts/list_package_references.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ def get_cli_args():

def get_github_args():
github = json.loads(os.environ.get("GITHUB_CONTEXT", "{}"))
inputs = json.loads(os.environ.get("GITHUB_INPUT", "{}"))

event = github.get("event", {})
inputs = event.get("inputs", {})

selection_config = root_path / "defaults.yaml"

Expand Down

0 comments on commit c3cd354

Please sign in to comment.