Skip to content

Commit b92c2af

Browse files
committed
add modified YAML file
1 parent afc4b10 commit b92c2af

File tree

1 file changed

+146
-0
lines changed

1 file changed

+146
-0
lines changed

.github/workflows/opt-maven.yml

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
# This workflow is designed to build PRs for AHC. Note that it does not actually publish AHC, just builds and test it.
2+
# Docs: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3+
4+
name: Modified Build PR
5+
jobs:
6+
RunOnLinux:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Setup Python 3.10
10+
uses: actions/setup-python@v5
11+
with:
12+
python-version: '3.10'
13+
- name: Install dependencies
14+
run: |-
15+
python -m pip install --upgrade pip
16+
pip install inotify
17+
- name: Run inotifywait
18+
run: |-
19+
python3 -c "
20+
import inotify.adapters
21+
import inotify.constants
22+
import os
23+
from datetime import datetime, timezone
24+
with open('/home/runner/inotifywait-log-RunOnLinux.csv', 'w') as log_file:
25+
i = inotify.adapters.InotifyTree('/home/runner/work/async-http-client/async-http-client', inotify.constants.IN_CREATE | inotify.constants.IN_ACCESS)
26+
for event in i.event_gen(yield_nones=False):
27+
(_, type_names, path, filename) = event
28+
now = datetime.now(timezone.utc).strftime('%Y-%m-%dT%H:%M:%S.%f') + 'Z'
29+
events = ','.join(type_names)
30+
log_file.write(f'{now};{path};{filename};{events}\n')
31+
log_file.flush()
32+
os.fsync(log_file.fileno())
33+
" &
34+
- uses: actions/checkout@v4
35+
- run: touch optcd-3.txt
36+
- name: Grant Permission
37+
run: sudo chmod +x ./mvnw
38+
- run: touch optcd-4.txt
39+
- uses: actions/setup-java@v4
40+
with:
41+
distribution: corretto
42+
java-version: '11'
43+
- run: touch optcd-5.txt
44+
- name: Run Tests
45+
run: ./mvnw -B -ntp clean test
46+
- run: touch optcd-6.txt
47+
- name: Upload inotifywait logs
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: inotifywait-RunOnLinux
51+
path: /home/runner/inotifywait-log-RunOnLinux.csv
52+
name: RunOnLinux
53+
RunOnMacOs:
54+
runs-on: macos-latest
55+
steps:
56+
- name: Setup Python 3.10
57+
uses: actions/setup-python@v5
58+
with:
59+
python-version: '3.10'
60+
- name: Install dependencies
61+
run: |-
62+
python -m pip install --upgrade pip
63+
pip install inotify
64+
- name: Run inotifywait
65+
run: |-
66+
python3 -c "
67+
import inotify.adapters
68+
import inotify.constants
69+
import os
70+
from datetime import datetime, timezone
71+
with open('/home/runner/inotifywait-log-RunOnMacOs.csv', 'w') as log_file:
72+
i = inotify.adapters.InotifyTree('/home/runner/work/async-http-client/async-http-client', inotify.constants.IN_CREATE | inotify.constants.IN_ACCESS)
73+
for event in i.event_gen(yield_nones=False):
74+
(_, type_names, path, filename) = event
75+
now = datetime.now(timezone.utc).strftime('%Y-%m-%dT%H:%M:%S.%f') + 'Z'
76+
events = ','.join(type_names)
77+
log_file.write(f'{now};{path};{filename};{events}\n')
78+
log_file.flush()
79+
os.fsync(log_file.fileno())
80+
" &
81+
- uses: actions/checkout@v4
82+
- run: touch optcd-3.txt
83+
- name: Grant Permission
84+
run: sudo chmod +x ./mvnw
85+
- run: touch optcd-4.txt
86+
- uses: actions/setup-java@v4
87+
with:
88+
distribution: corretto
89+
java-version: '11'
90+
- run: touch optcd-5.txt
91+
- name: Run Tests
92+
run: ./mvnw -B -ntp clean test
93+
- run: touch optcd-6.txt
94+
- name: Upload inotifywait logs
95+
uses: actions/upload-artifact@v4
96+
with:
97+
name: inotifywait-RunOnMacOs
98+
path: /home/runner/inotifywait-log-RunOnMacOs.csv
99+
name: RunOnMacOs
100+
RunOnWindows:
101+
runs-on: windows-latest
102+
steps:
103+
- name: Setup Python 3.10
104+
uses: actions/setup-python@v5
105+
with:
106+
python-version: '3.10'
107+
- name: Install dependencies
108+
run: |-
109+
python -m pip install --upgrade pip
110+
pip install inotify
111+
- name: Run inotifywait
112+
run: |-
113+
python3 -c "
114+
import inotify.adapters
115+
import inotify.constants
116+
import os
117+
from datetime import datetime, timezone
118+
with open('/home/runner/inotifywait-log-RunOnWindows.csv', 'w') as log_file:
119+
i = inotify.adapters.InotifyTree('/home/runner/work/async-http-client/async-http-client', inotify.constants.IN_CREATE | inotify.constants.IN_ACCESS)
120+
for event in i.event_gen(yield_nones=False):
121+
(_, type_names, path, filename) = event
122+
now = datetime.now(timezone.utc).strftime('%Y-%m-%dT%H:%M:%S.%f') + 'Z'
123+
events = ','.join(type_names)
124+
log_file.write(f'{now};{path};{filename};{events}\n')
125+
log_file.flush()
126+
os.fsync(log_file.fileno())
127+
" &
128+
- uses: actions/checkout@v4
129+
- run: touch optcd-3.txt
130+
- uses: actions/setup-java@v4
131+
with:
132+
distribution: corretto
133+
java-version: '11'
134+
- run: touch optcd-4.txt
135+
- name: Run Tests
136+
run: ./mvnw.cmd -B -ntp clean test
137+
- run: touch optcd-5.txt
138+
- name: Upload inotifywait logs
139+
uses: actions/upload-artifact@v4
140+
with:
141+
name: inotifywait-RunOnWindows
142+
path: /home/runner/inotifywait-log-RunOnWindows.csv
143+
name: RunOnWindows
144+
'on':
145+
- push
146+
- workflow_dispatch

0 commit comments

Comments
 (0)