Skip to content

Commit

Permalink
try again
Browse files Browse the repository at this point in the history
  • Loading branch information
andiwand committed Dec 28, 2024
1 parent e59b952 commit e18b113
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build_one.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
generate-matrix:
runs-on: ubuntu-24.04
outputs:
matrix: ${{ steps.list-build-matrix.outputs.matrix }}
configs: ${{ steps.list-build-matrix.outputs.configs }}
steps:
- name: checkout
uses: actions/checkout@v4
Expand All @@ -48,14 +48,15 @@ jobs:
GITHUB_INPUT: ${{ toJson(inputs) }}

build:
if: ${{ needs.generate-matrix.outputs.matrix != '[]' && needs.generate-matrix.outputs.matrix != '' }}
if: ${{ needs.generate-matrix.outputs.configs != '[]' && needs.generate-matrix.outputs.configs != '' }}
name : ${{ matrix.config.host_profile }}
needs:
- generate-matrix
runs-on: ${{ matrix.config.build_machine }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
matrix:
config: ${{ fromJson(needs.generate-matrix.outputs.configs) }}
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down
13 changes: 5 additions & 8 deletions scripts/list_build_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,18 @@
root_path = script_path.parent


def get_build_matrix(package_reference, conanfile, selection_config_path):
def get_build_matrix(package_reference, selection_config_path):
if selection_config_path is None:
selection_config = None
else:
with open(selection_config_path) as f:
selection_config = yaml.safe_load(f)

build_matrix = {
"conanfile": str(conanfile),
"config": [],
}
build_matrix = []

def check_and_append(platform, config):
if selection_config is None:
build_matrix["config"].append(config)
build_matrix.append(config)
return

if all(
Expand Down Expand Up @@ -87,7 +84,7 @@ def check_and_append(platform, config):
if rule_excluded:
return

build_matrix["config"].append(config)
build_matrix.append(config)

# android
for platform in [
Expand Down Expand Up @@ -230,7 +227,7 @@ def main():

if is_github:
with open(args.github_output, "w") as out:
print(f"matrix={json.dumps(build_matrix)}", file=out)
print(f"configs={json.dumps(build_matrix)}", file=out)

return 0

Expand Down

0 comments on commit e18b113

Please sign in to comment.