Skip to content

Commit 16b1e3f

Browse files
author
Colin Davidson
committed
TBD2
1 parent 8471a1a commit 16b1e3f

File tree

3 files changed

+105
-56
lines changed

3 files changed

+105
-56
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: calc vars
2+
description: calc vars
3+
4+
# Some of these are riscv or host target specific, but it does not harm at present to
5+
# overset cmake values
6+
inputs:
7+
target:
8+
description: 'TBD'
9+
default: host_x86
10+
11+
outputs:
12+
arch:
13+
value: ${{ steps.calc_vars.outputs.arch }}
14+
runs:
15+
# We don't want a new docker just a list of steps, so mark as composite
16+
using: "composite"
17+
steps:
18+
# -
19+
- shell: ${{ inputs.shell_to_use }}
20+
id: calc_vars
21+
run:
22+
echo "arch=aarch64" >> $GITHUB_OUTPUT

.github/workflows/workflow1.yml

Lines changed: 83 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,97 @@ jobs:
1212
# matrix: ${{ steps.set-matrix.outputs.matrix_include }}
1313
# steps:
1414
# - id: set-matrix
15-
# run: echo "matrix_include=[{\"project\":\"foo\",\"config\":\"Debug\"},{\"project\":\"bar\",\"config\":\"Release\"}]" >> $GITHUB_OUTPUT
15+
# run: |
16+
# # echo "matrix_include=[{\"os_flags\": \"wibble\"},{\"os_flags\": \"wibble_x64\", \"target\": \"x64\"}]" >> $GITHUB_OUTPUT
17+
# echo 'matrix_include=["os_flags", "wibble"]' >> $GITHUB_OUTPUT
18+
# cat $GITHUB_OUTPUT
1619

17-
job2:
18-
# needs: job1
20+
calc_matrix:
1921
runs-on: ubuntu-latest
20-
strategy:
21-
matrix:
22-
target: [x64, aarch64]
23-
include:
24-
- os_flags: wibble
25-
- os_flags: wibble_x64
26-
target: x64
22+
name: Calc matrix
23+
outputs:
24+
target: ${{ steps.step1.outputs.target }}
25+
# matrix_include: ${{ steps.step1.outputs.matrix_include }}
26+
steps:
27+
- id: step1
28+
run: |
29+
# # python ./github/scripts/update_vars.py >> "$GITHUB_OUTPUT"
30+
# # echo "target_list=$target_list" >> "$GITHUB_OUTPUT"
31+
# # echo "os_list=$os_list" >> "$GITHUB_OUTPUT"
32+
# echo 'target=["x86", "aarch64"]' >> "$GITHUB_OUTPUT"
33+
# # echo 'os_list=["os_flags", "wibble"]' >> "$GITHUB_OUTPUT"
34+
# # echo 'matrix_include=[{"os_flags": "wibble"},{"os_flags": "wibble_x64", "target": "x86"}]' >> $GITHUB_OUTPUT
35+
echo 'target=[ "host_x86", "host_aarch64"]' >> $GITHUB_OUTPUT
36+
cat $GITHUB_OUTPUT
37+
38+
# create_ock_artefacts:
39+
# # needs: calc_matrix
40+
# strategy:
41+
# matrix:
42+
43+
# target: ["x86", "aarch64"]
44+
# # target: ${{ fromJson(needs.calc_matrix.outputs.target) }}
45+
# # include: ${{ fromJson(needs.calc_matrix.outputs.matrix_include) }}
46+
# exclude:
47+
# - target: x86
48+
# # os: ${{ fromJson(needs.calc_matrix.outputs.os_list) }}
49+
# # build_type: [RelAssert]
50+
# # exclude:
51+
# # - os: windows-2019
52+
# # - target: riscv64
53+
# # - target: aarch64
54+
create_ock_artefacts:
55+
runs-on: ubuntu-latest
56+
needs: calc_matrix
57+
steps:
58+
# - name: Checkout repo
59+
# uses: actions/[email protected]
60+
# - id: calc_vars2
61+
# uses: ./.github/actions/calc_vars
62+
# with:
63+
# target: ${{ matrix.target }}
64+
# - id: calc_vars
65+
# run:
66+
# echo "arch=aarch64" >> $GITHUB_OUTPUT
67+
- if: ${{ contains(needs.calc_matrix.outputs.target, 'host_x86') }}
68+
run: |
69+
# echo target=${{ matrix.target }}
70+
# echo arch=${{ steps.calc_vars2.outputs.arch }}
71+
# echo arch=${{ steps.calc_vars.outputs.arch }}
72+
# echo arch=${{ fromJson('{"host_x86":{"arch": "x86_64"},"host_aarch64":{"arch": "arch64"}}').needs.calc_matrix.outputs.target }}.arch
73+
echo Run x86
74+
75+
- if: ${{ contains(needs.calc_matrix.outputs.target, 'host_aarch64") }}
76+
run: |
77+
echo Run aarch64
78+
79+
- if: ${{ contains(needs.calc_matrix.outputs.target, "host_riscv64") }}
80+
run: |
81+
echo Run riscv64
82+
83+
# job2:
84+
# # needs: job1
85+
# runs-on: ubuntu-latest
86+
# strategy:
87+
# matrix:
88+
# target: [x64, aarch64]
89+
# wibble: ${{ fromJSON(needs.job1.outputs.matrix_include) }}
90+
#'[{\"os_flags\": \"wibble\"},{\"os_flags\": \"wibble_x64\", \"target\": \"x64\"}]') }}
91+
# - os_flags: wibble
92+
# - os_flags: wibble_x64
93+
# target: x64
2794
#${{fromJson('[{"os_flags":"wibble"},{"os_flags":"bar","targets":"x64"}]')}}
2895
# {\"include\":[{\"project\":\"foo\",\"config\":\"Debug\"},{\"project\":\"bar\",\"config\":\"Release\"}]}
2996
# {\"include\":[{\"project\":\"foo\",\"config\":\"Debug\"},{\"project\":\"bar\",\"config\":\"Release\"}]}
3097
# needs.job1.outputs.matrix_include)}}
3198
# targets: ["x64","aarch64", "riscv64"]
3299
# include: ${{toJSON(needs.job1.outputs.matrix_include)}}
33-
steps:
34-
- run: |
35-
echo ${{ toJSON(matrix.targets) }}
36-
echo ${{ toJson(matrix.include) }}
37-
echo target=${{ matrix.targets }}
38-
echo os_flags=${{ matrix.os_flags }}
100+
# steps:
101+
# - run: |
102+
# # echo ${{ toJSON(matrix.target) }}
103+
# echo ${{ toJson(matrix) }}
104+
# echo target=${{ matrix.target }}
105+
# echo os_flags=${{ matrix.os_flags }}
39106

40107
# calc_matrix:
41108
# runs-on: ubuntu-latest

.github/workflows/workflow_callee.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)