Skip to content

Commit 9539f1e

Browse files
author
Colin Davidson
committed
TBD
1 parent c0dbb65 commit 9539f1e

File tree

3 files changed

+115
-51
lines changed

3 files changed

+115
-51
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: 94 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,82 @@
11
on:
22
pull_request:
3+
push:
4+
branches:
5+
- main
36

4-
env:
5-
target_list: '["x64","aarch64", "riscv64"]'
6-
os_list: '["ubuntu-22.04", "windows-2019"]'
7+
# env:
8+
# target_list: '["x64","aarch64", "riscv64"]'
9+
# os_list: '["ubuntu-22.04", "windows-2019"]'
710

811
jobs:
12+
job1:
13+
permissions:
14+
actions: write
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repo
18+
uses: actions/[email protected]
19+
- name: delete cache
20+
env:
21+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
run: |
23+
gh cache delete ccache-ccache-build-wibble-2025-02-18T17:39:18.983Z
24+
25+
# - name: Setup ccache
26+
# uses: hendrikmuhs/ccache-action@53911442209d5c18de8a31615e0923161e435875 # v1.2.16
27+
# with:
28+
# max-size: 200M
29+
# key: ccache-build-wibble
30+
# variant: ccache
31+
# save: true
32+
# - name: build
33+
# run: |
34+
# /usr/lib/ccache/gcc hello.c -c -o hello1
35+
# /usr/lib/ccache/gcc hello.c -c -o hello2
36+
# /usr/lib/ccache/gcc hello.c -c -o hello3
37+
# /usr/lib/ccache/gcc hello.c -c -o hello4
38+
# /usr/lib/ccache/gcc hello.c -c -o hello5
39+
# /usr/lib/ccache/gcc hello.c -c -o hello6
40+
# /usr/lib/ccache/gcc hello.c -c -o hello7
41+
# /usr/lib/ccache/gcc hello.c -c -o hello8
42+
# ccache -s
43+
44+
45+
946
# job1:
1047
# runs-on: ubuntu-latest
1148
# outputs:
12-
# matrix: ${{ steps.set-matrix.outputs.matrix_include }}
49+
# matrix: ${{ steps.myid.outputs.matrix }}
1350
# steps:
14-
# - id: set-matrix
51+
# - id: myid
1552
# run: |
1653
# # echo "matrix_include=[{\"os_flags\": \"wibble\"},{\"os_flags\": \"wibble_x64\", \"target\": \"x64\"}]" >> $GITHUB_OUTPUT
17-
# echo 'matrix_include=["os_flags", "wibble"]' >> $GITHUB_OUTPUT
54+
# echo 'matrix="aarch64"' >> $GITHUB_OUTPUT
1855
# cat $GITHUB_OUTPUT
56+
# - if: steps.myid.output.matrix == 'aarch64'
57+
# run:
58+
# echo is aarch64
59+
# - if: steps.myid.output.matrix != 'aarch64'
60+
# run:
61+
# echo is NOT aarch64
1962

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

3881
# create_ock_artefacts:
3982
# # needs: calc_matrix
@@ -51,34 +94,34 @@ jobs:
5194
# # - os: windows-2019
5295
# # - target: riscv64
5396
# # - 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
97+
# create_ock_artefacts:
98+
# runs-on: ubuntu-latest
99+
# needs: calc_matrix
100+
# steps:
101+
# # - name: Checkout repo
102+
# # uses: actions/[email protected]
103+
# # - id: calc_vars2
104+
# # uses: ./.github/actions/calc_vars
105+
# # with:
106+
# # target: ${{ matrix.target }}
107+
# # - id: calc_vars
108+
# # run:
109+
# # echo "arch=aarch64" >> $GITHUB_OUTPUT
110+
# - if: ${{ contains(needs.calc_matrix.outputs.target, 'host_x86') }}
111+
# run: |
112+
# # echo target=${{ matrix.target }}
113+
# # echo arch=${{ steps.calc_vars2.outputs.arch }}
114+
# # echo arch=${{ steps.calc_vars.outputs.arch }}
115+
# # echo arch=${{ fromJson('{"host_x86":{"arch": "x86_64"},"host_aarch64":{"arch": "arch64"}}').needs.calc_matrix.outputs.target }}.arch
116+
# echo Run x86
117+
118+
# - if: ${{ contains(needs.calc_matrix.outputs.target, 'host_aarch64') }}
119+
# run: |
120+
# echo Run aarch64
121+
122+
# - if: ${{ contains(needs.calc_matrix.outputs.target, 'host_riscv64') }}
123+
# run: |
124+
# echo Run riscv64
82125

83126
# job2:
84127
# # 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)