Skip to content

Commit fc664ed

Browse files
author
Colin Davidson
committed
TBD
1 parent c0dbb65 commit fc664ed

File tree

2 files changed

+75
-46
lines changed

2 files changed

+75
-46
lines changed

.github/actions/wibble/action.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: wibble
2+
description: wibble
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- shell: bash
8+
run:
9+
mkdir foo
10+
mkdir foo/jim
11+
cd foo/jim
12+
pwd
13+
14+
- shell: bash
15+
run:
16+
pwd

.github/workflows/workflow1.yml

Lines changed: 59 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,47 @@ env:
66
os_list: '["ubuntu-22.04", "windows-2019"]'
77

88
jobs:
9+
job1:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repo
13+
uses: actions/checkout@v4.1.0
14+
- name: wibble
15+
uses: ./.github/actions/wibble
916
# job1:
1017
# runs-on: ubuntu-latest
1118
# outputs:
12-
# matrix: ${{ steps.set-matrix.outputs.matrix_include }}
19+
# matrix: ${{ steps.myid.outputs.matrix }}
1320
# steps:
14-
# - id: set-matrix
21+
# - id: myid
1522
# run: |
1623
# # echo "matrix_include=[{\"os_flags\": \"wibble\"},{\"os_flags\": \"wibble_x64\", \"target\": \"x64\"}]" >> $GITHUB_OUTPUT
17-
# echo 'matrix_include=["os_flags", "wibble"]' >> $GITHUB_OUTPUT
24+
# echo 'matrix="aarch64"' >> $GITHUB_OUTPUT
1825
# cat $GITHUB_OUTPUT
26+
# - if: steps.myid.output.matrix == 'aarch64'
27+
# run:
28+
# echo is aarch64
29+
# - if: steps.myid.output.matrix != 'aarch64'
30+
# run:
31+
# echo is NOT aarch64
1932

20-
calc_matrix:
21-
runs-on: ubuntu-latest
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
33+
# calc_matrix:
34+
# runs-on: ubuntu-latest
35+
# name: Calc matrix
36+
# outputs:
37+
# target: ${{ steps.step1.outputs.target }}
38+
# # matrix_include: ${{ steps.step1.outputs.matrix_include }}
39+
# steps:
40+
# - id: step1
41+
# run: |
42+
# # # python ./github/scripts/update_vars.py >> "$GITHUB_OUTPUT"
43+
# # # echo "target_list=$target_list" >> "$GITHUB_OUTPUT"
44+
# # # echo "os_list=$os_list" >> "$GITHUB_OUTPUT"
45+
# # echo 'target=["x86", "aarch64"]' >> "$GITHUB_OUTPUT"
46+
# # # echo 'os_list=["os_flags", "wibble"]' >> "$GITHUB_OUTPUT"
47+
# # # echo 'matrix_include=[{"os_flags": "wibble"},{"os_flags": "wibble_x64", "target": "x86"}]' >> $GITHUB_OUTPUT
48+
# echo 'target=[ "host_x86", "host_aarch64"]' >> $GITHUB_OUTPUT
49+
# cat $GITHUB_OUTPUT
3750

3851
# create_ock_artefacts:
3952
# # needs: calc_matrix
@@ -51,34 +64,34 @@ jobs:
5164
# # - os: windows-2019
5265
# # - target: riscv64
5366
# # - target: aarch64
54-
create_ock_artefacts:
55-
runs-on: ubuntu-latest
56-
needs: calc_matrix
57-
steps:
58-
# - name: Checkout repo
59-
# uses: actions/checkout@v4.1.0
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
67+
# create_ock_artefacts:
68+
# runs-on: ubuntu-latest
69+
# needs: calc_matrix
70+
# steps:
71+
# # - name: Checkout repo
72+
# # uses: actions/checkout@v4.1.0
73+
# # - id: calc_vars2
74+
# # uses: ./.github/actions/calc_vars
75+
# # with:
76+
# # target: ${{ matrix.target }}
77+
# # - id: calc_vars
78+
# # run:
79+
# # echo "arch=aarch64" >> $GITHUB_OUTPUT
80+
# - if: ${{ contains(needs.calc_matrix.outputs.target, 'host_x86') }}
81+
# run: |
82+
# # echo target=${{ matrix.target }}
83+
# # echo arch=${{ steps.calc_vars2.outputs.arch }}
84+
# # echo arch=${{ steps.calc_vars.outputs.arch }}
85+
# # echo arch=${{ fromJson('{"host_x86":{"arch": "x86_64"},"host_aarch64":{"arch": "arch64"}}').needs.calc_matrix.outputs.target }}.arch
86+
# echo Run x86
7487

75-
- if: ${{ contains(needs.calc_matrix.outputs.target, 'host_aarch64') }}
76-
run: |
77-
echo Run aarch64
88+
# - if: ${{ contains(needs.calc_matrix.outputs.target, 'host_aarch64') }}
89+
# run: |
90+
# echo Run aarch64
7891

79-
- if: ${{ contains(needs.calc_matrix.outputs.target, 'host_riscv64') }}
80-
run: |
81-
echo Run riscv64
92+
# - if: ${{ contains(needs.calc_matrix.outputs.target, 'host_riscv64') }}
93+
# run: |
94+
# echo Run riscv64
8295

8396
# job2:
8497
# # needs: job1

0 commit comments

Comments
 (0)