Skip to content

Commit b4c9375

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

3 files changed

Lines changed: 110 additions & 51 deletions

File tree

.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: 89 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,77 @@
11
on:
22
pull_request:
33

4-
env:
5-
target_list: '["x64","aarch64", "riscv64"]'
6-
os_list: '["ubuntu-22.04", "windows-2019"]'
4+
# env:
5+
# target_list: '["x64","aarch64", "riscv64"]'
6+
# 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: delete cache
15+
env:
16+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
run: |
18+
gh cache delete ccache-ccache-build-wibble-2025-02-18T17:38:37.061Z
19+
20+
# - name: Setup ccache
21+
# uses: hendrikmuhs/ccache-action@53911442209d5c18de8a31615e0923161e435875 # v1.2.16
22+
# with:
23+
# max-size: 200M
24+
# key: ccache-build-wibble
25+
# variant: ccache
26+
# save: true
27+
# - name: build
28+
# run: |
29+
# /usr/lib/ccache/gcc hello.c -c -o hello1
30+
# /usr/lib/ccache/gcc hello.c -c -o hello2
31+
# /usr/lib/ccache/gcc hello.c -c -o hello3
32+
# /usr/lib/ccache/gcc hello.c -c -o hello4
33+
# /usr/lib/ccache/gcc hello.c -c -o hello5
34+
# /usr/lib/ccache/gcc hello.c -c -o hello6
35+
# /usr/lib/ccache/gcc hello.c -c -o hello7
36+
# /usr/lib/ccache/gcc hello.c -c -o hello8
37+
# ccache -s
38+
39+
40+
941
# job1:
1042
# runs-on: ubuntu-latest
1143
# outputs:
12-
# matrix: ${{ steps.set-matrix.outputs.matrix_include }}
44+
# matrix: ${{ steps.myid.outputs.matrix }}
1345
# steps:
14-
# - id: set-matrix
46+
# - id: myid
1547
# run: |
1648
# # echo "matrix_include=[{\"os_flags\": \"wibble\"},{\"os_flags\": \"wibble_x64\", \"target\": \"x64\"}]" >> $GITHUB_OUTPUT
17-
# echo 'matrix_include=["os_flags", "wibble"]' >> $GITHUB_OUTPUT
49+
# echo 'matrix="aarch64"' >> $GITHUB_OUTPUT
1850
# cat $GITHUB_OUTPUT
51+
# - if: steps.myid.output.matrix == 'aarch64'
52+
# run:
53+
# echo is aarch64
54+
# - if: steps.myid.output.matrix != 'aarch64'
55+
# run:
56+
# echo is NOT aarch64
1957

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
58+
# calc_matrix:
59+
# runs-on: ubuntu-latest
60+
# name: Calc matrix
61+
# outputs:
62+
# target: ${{ steps.step1.outputs.target }}
63+
# # matrix_include: ${{ steps.step1.outputs.matrix_include }}
64+
# steps:
65+
# - id: step1
66+
# run: |
67+
# # # python ./github/scripts/update_vars.py >> "$GITHUB_OUTPUT"
68+
# # # echo "target_list=$target_list" >> "$GITHUB_OUTPUT"
69+
# # # echo "os_list=$os_list" >> "$GITHUB_OUTPUT"
70+
# # echo 'target=["x86", "aarch64"]' >> "$GITHUB_OUTPUT"
71+
# # # echo 'os_list=["os_flags", "wibble"]' >> "$GITHUB_OUTPUT"
72+
# # # echo 'matrix_include=[{"os_flags": "wibble"},{"os_flags": "wibble_x64", "target": "x86"}]' >> $GITHUB_OUTPUT
73+
# echo 'target=[ "host_x86", "host_aarch64"]' >> $GITHUB_OUTPUT
74+
# cat $GITHUB_OUTPUT
3775

3876
# create_ock_artefacts:
3977
# # needs: calc_matrix
@@ -51,34 +89,34 @@ jobs:
5189
# # - os: windows-2019
5290
# # - target: riscv64
5391
# # - 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
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
92+
# create_ock_artefacts:
93+
# runs-on: ubuntu-latest
94+
# needs: calc_matrix
95+
# steps:
96+
# # - name: Checkout repo
97+
# # uses: actions/checkout@v4.1.0
98+
# # - id: calc_vars2
99+
# # uses: ./.github/actions/calc_vars
100+
# # with:
101+
# # target: ${{ matrix.target }}
102+
# # - id: calc_vars
103+
# # run:
104+
# # echo "arch=aarch64" >> $GITHUB_OUTPUT
105+
# - if: ${{ contains(needs.calc_matrix.outputs.target, 'host_x86') }}
106+
# run: |
107+
# # echo target=${{ matrix.target }}
108+
# # echo arch=${{ steps.calc_vars2.outputs.arch }}
109+
# # echo arch=${{ steps.calc_vars.outputs.arch }}
110+
# # echo arch=${{ fromJson('{"host_x86":{"arch": "x86_64"},"host_aarch64":{"arch": "arch64"}}').needs.calc_matrix.outputs.target }}.arch
111+
# echo Run x86
112+
113+
# - if: ${{ contains(needs.calc_matrix.outputs.target, 'host_aarch64') }}
114+
# run: |
115+
# echo Run aarch64
116+
117+
# - if: ${{ contains(needs.calc_matrix.outputs.target, 'host_riscv64') }}
118+
# run: |
119+
# echo Run riscv64
82120

83121
# job2:
84122
# # needs: job1

hello.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#include <stdio.h>
2+
3+
int main() {
4+
printf("Hello World\n");
5+
}

0 commit comments

Comments
 (0)