-
Notifications
You must be signed in to change notification settings - Fork 8
116 lines (104 loc) · 4.12 KB
/
experiments.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Experiments
on:
workflow_dispatch
jobs:
experiments:
outputs:
# accessible from other jobs as ${{needs.experiments.outputs.version}}
version: ${{steps.version.outputs.version}}
runs-on: windows-latest
steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# submodules: 'true'
- name: Print environment (before)
shell: cmd
run: |
echo ----------------------------------------------------
set
echo ----------------------------------------------------
for %%d in (%SystemDrive%\msys64\mingw32 %SystemDrive%\msys64\mingw64 %SystemDrive%\mingw32 %SystemDrive%\mingw64) do (
if exist "%%d\bin\gcc.exe" echo ---------- %%d\bin\gcc.exe ---------- && "%%d\bin\gcc.exe" -v
)
echo ----------------------------------------------------
dir /b /s %SystemDrive%\msys64\*.exe
echo ----------------------------------------------------
where gcc.exe
gcc.exe -v
echo ====================================================
py -0p
echo ----------------------------------------------------
py -3 -V
py -3 -m pip list
# [note] Pulls latest mingw-w64 (14.2.0) using msys2/pacman
# [note] Quite slow (4-5m)
# - name: Setup msys2/mingw32
# id: setup-msys2-mingw32
# uses: msys2/setup-msys2@v2
# with:
# msystem: mingw32
# release: false
# update: true
# install: mingw-w64-i686-toolchain
# - name: Setup msys2/mingw64
# id: setup-msys2-mingw64
# uses: msys2/setup-msys2@v2
# with:
# msystem: mingw64
# release: false
# update: true
# install: mingw-w64-x86_64-toolchain
# [note] Downloads an older mingw-w64 (13.2.0) with Chocolately
# [note] Runtime error: Cannot find path 'C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw32\i686-w64-mingw32\lib\libpthread.dll.a' because it does not exist
# - name: Setup mingw32
# id: setup-mingw32
# uses: egor-tensin/setup-mingw@v2
# with:
# platform: x86
# - name: Setup mingw64
# id: setup-mingw64
# uses: egor-tensin/setup-mingw@v2
# with:
# platform: x64
- name: Print environment
shell: cmd
run: |
echo ----------------------------------------------------
set
echo ----------------------------------------------------
for %%d in (%SystemDrive%\msys64\mingw32 %SystemDrive%\msys64\mingw64 %SystemDrive%\mingw32 %SystemDrive%\mingw64) do (
if exist "%%d\bin\gcc.exe" echo ---------- %%d\bin\gcc.exe ---------- && "%%d\bin\gcc.exe" -v
)
echo ----------------------------------------------------
dir /b /s %SystemDrive%\msys64\*.exe
echo ----------------------------------------------------
where gcc.exe
gcc.exe -v
echo ====================================================
py -0p
echo ----------------------------------------------------
py -3 -V
py -3 -m pip list
- id: version
name: Version
shell: python
run: |
import os
from datetime import datetime, timezone
date = datetime.now(tz=timezone.utc)
with open(os.getenv('GITHUB_OUTPUT'), "a") as fout:
print( f"version={date.year%100}.{date.month}.{date.day}.${{github.run_number}}")
fout.write(f"version={date.year%100}.{date.month}.{date.day}.${{github.run_number}}")
- name: Print version
shell: cmd
run: |
echo -- version is ${{steps.version.outputs.version}}
results:
runs-on: windows-latest
needs: experiments
steps:
- name: Print version
shell: cmd
run: |
echo previous version=${{needs.experiments.outputs.version}}