From afc4b10aa0d356e63d221fcb2838d5c648e979a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emirhan=20O=C4=9Ful?= Date: Sun, 6 Oct 2024 17:31:42 +0300 Subject: [PATCH 1/2] add modified YAML file --- .github/workflows/opt-builds.yml | 144 +++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 .github/workflows/opt-builds.yml diff --git a/.github/workflows/opt-builds.yml b/.github/workflows/opt-builds.yml new file mode 100644 index 000000000..3921a04b8 --- /dev/null +++ b/.github/workflows/opt-builds.yml @@ -0,0 +1,144 @@ + +name: Modified Build Check +jobs: + RunOnLinux: + runs-on: ubuntu-latest + steps: + - name: Setup Python 3.10 + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Install dependencies + run: |- + python -m pip install --upgrade pip + pip install inotify + - name: Run inotifywait + run: |- + python3 -c " + import inotify.adapters + import inotify.constants + import os + from datetime import datetime, timezone + with open('/home/runner/inotifywait-log-RunOnLinux.csv', 'w') as log_file: + i = inotify.adapters.InotifyTree('/home/runner/work/async-http-client/async-http-client', inotify.constants.IN_CREATE | inotify.constants.IN_ACCESS) + for event in i.event_gen(yield_nones=False): + (_, type_names, path, filename) = event + now = datetime.now(timezone.utc).strftime('%Y-%m-%dT%H:%M:%S.%f') + 'Z' + events = ','.join(type_names) + log_file.write(f'{now};{path};{filename};{events}\n') + log_file.flush() + os.fsync(log_file.fileno()) + " & + - uses: actions/checkout@v4 + - run: touch optcd-3.txt + - name: Grant Permission + run: sudo chmod +x ./mvnw + - run: touch optcd-4.txt + - uses: actions/setup-java@v4 + with: + distribution: corretto + java-version: '11' + - run: touch optcd-5.txt + - name: Run Tests + run: ./mvnw -B -ntp clean test + - run: touch optcd-6.txt + - name: Upload inotifywait logs + uses: actions/upload-artifact@v4 + with: + name: inotifywait-RunOnLinux + path: /home/runner/inotifywait-log-RunOnLinux.csv + name: RunOnLinux + RunOnMacOs: + runs-on: macos-latest + steps: + - name: Setup Python 3.10 + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Install dependencies + run: |- + python -m pip install --upgrade pip + pip install inotify + - name: Run inotifywait + run: |- + python3 -c " + import inotify.adapters + import inotify.constants + import os + from datetime import datetime, timezone + with open('/home/runner/inotifywait-log-RunOnMacOs.csv', 'w') as log_file: + i = inotify.adapters.InotifyTree('/home/runner/work/async-http-client/async-http-client', inotify.constants.IN_CREATE | inotify.constants.IN_ACCESS) + for event in i.event_gen(yield_nones=False): + (_, type_names, path, filename) = event + now = datetime.now(timezone.utc).strftime('%Y-%m-%dT%H:%M:%S.%f') + 'Z' + events = ','.join(type_names) + log_file.write(f'{now};{path};{filename};{events}\n') + log_file.flush() + os.fsync(log_file.fileno()) + " & + - uses: actions/checkout@v4 + - run: touch optcd-3.txt + - name: Grant Permission + run: sudo chmod +x ./mvnw + - run: touch optcd-4.txt + - uses: actions/setup-java@v4 + with: + distribution: corretto + java-version: '11' + - run: touch optcd-5.txt + - name: Run Tests + run: ./mvnw -B -ntp clean test + - run: touch optcd-6.txt + - name: Upload inotifywait logs + uses: actions/upload-artifact@v4 + with: + name: inotifywait-RunOnMacOs + path: /home/runner/inotifywait-log-RunOnMacOs.csv + name: RunOnMacOs + RunOnWindows: + runs-on: windows-latest + steps: + - name: Setup Python 3.10 + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Install dependencies + run: |- + python -m pip install --upgrade pip + pip install inotify + - name: Run inotifywait + run: |- + python3 -c " + import inotify.adapters + import inotify.constants + import os + from datetime import datetime, timezone + with open('/home/runner/inotifywait-log-RunOnWindows.csv', 'w') as log_file: + i = inotify.adapters.InotifyTree('/home/runner/work/async-http-client/async-http-client', inotify.constants.IN_CREATE | inotify.constants.IN_ACCESS) + for event in i.event_gen(yield_nones=False): + (_, type_names, path, filename) = event + now = datetime.now(timezone.utc).strftime('%Y-%m-%dT%H:%M:%S.%f') + 'Z' + events = ','.join(type_names) + log_file.write(f'{now};{path};{filename};{events}\n') + log_file.flush() + os.fsync(log_file.fileno()) + " & + - uses: actions/checkout@v4 + - run: touch optcd-3.txt + - uses: actions/setup-java@v4 + with: + distribution: corretto + java-version: '11' + - run: touch optcd-4.txt + - name: Run Tests + run: ./mvnw.cmd -B -ntp clean test + - run: touch optcd-5.txt + - name: Upload inotifywait logs + uses: actions/upload-artifact@v4 + with: + name: inotifywait-RunOnWindows + path: /home/runner/inotifywait-log-RunOnWindows.csv + name: RunOnWindows +'on': +- push +- workflow_dispatch From b92c2af08bc5b11b54a74e8d5e8ca20cc6709056 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emirhan=20O=C4=9Ful?= Date: Sun, 6 Oct 2024 17:31:58 +0300 Subject: [PATCH 2/2] add modified YAML file --- .github/workflows/opt-maven.yml | 146 ++++++++++++++++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 .github/workflows/opt-maven.yml diff --git a/.github/workflows/opt-maven.yml b/.github/workflows/opt-maven.yml new file mode 100644 index 000000000..78e6449fb --- /dev/null +++ b/.github/workflows/opt-maven.yml @@ -0,0 +1,146 @@ +# This workflow is designed to build PRs for AHC. Note that it does not actually publish AHC, just builds and test it. +# Docs: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Modified Build PR +jobs: + RunOnLinux: + runs-on: ubuntu-latest + steps: + - name: Setup Python 3.10 + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Install dependencies + run: |- + python -m pip install --upgrade pip + pip install inotify + - name: Run inotifywait + run: |- + python3 -c " + import inotify.adapters + import inotify.constants + import os + from datetime import datetime, timezone + with open('/home/runner/inotifywait-log-RunOnLinux.csv', 'w') as log_file: + i = inotify.adapters.InotifyTree('/home/runner/work/async-http-client/async-http-client', inotify.constants.IN_CREATE | inotify.constants.IN_ACCESS) + for event in i.event_gen(yield_nones=False): + (_, type_names, path, filename) = event + now = datetime.now(timezone.utc).strftime('%Y-%m-%dT%H:%M:%S.%f') + 'Z' + events = ','.join(type_names) + log_file.write(f'{now};{path};{filename};{events}\n') + log_file.flush() + os.fsync(log_file.fileno()) + " & + - uses: actions/checkout@v4 + - run: touch optcd-3.txt + - name: Grant Permission + run: sudo chmod +x ./mvnw + - run: touch optcd-4.txt + - uses: actions/setup-java@v4 + with: + distribution: corretto + java-version: '11' + - run: touch optcd-5.txt + - name: Run Tests + run: ./mvnw -B -ntp clean test + - run: touch optcd-6.txt + - name: Upload inotifywait logs + uses: actions/upload-artifact@v4 + with: + name: inotifywait-RunOnLinux + path: /home/runner/inotifywait-log-RunOnLinux.csv + name: RunOnLinux + RunOnMacOs: + runs-on: macos-latest + steps: + - name: Setup Python 3.10 + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Install dependencies + run: |- + python -m pip install --upgrade pip + pip install inotify + - name: Run inotifywait + run: |- + python3 -c " + import inotify.adapters + import inotify.constants + import os + from datetime import datetime, timezone + with open('/home/runner/inotifywait-log-RunOnMacOs.csv', 'w') as log_file: + i = inotify.adapters.InotifyTree('/home/runner/work/async-http-client/async-http-client', inotify.constants.IN_CREATE | inotify.constants.IN_ACCESS) + for event in i.event_gen(yield_nones=False): + (_, type_names, path, filename) = event + now = datetime.now(timezone.utc).strftime('%Y-%m-%dT%H:%M:%S.%f') + 'Z' + events = ','.join(type_names) + log_file.write(f'{now};{path};{filename};{events}\n') + log_file.flush() + os.fsync(log_file.fileno()) + " & + - uses: actions/checkout@v4 + - run: touch optcd-3.txt + - name: Grant Permission + run: sudo chmod +x ./mvnw + - run: touch optcd-4.txt + - uses: actions/setup-java@v4 + with: + distribution: corretto + java-version: '11' + - run: touch optcd-5.txt + - name: Run Tests + run: ./mvnw -B -ntp clean test + - run: touch optcd-6.txt + - name: Upload inotifywait logs + uses: actions/upload-artifact@v4 + with: + name: inotifywait-RunOnMacOs + path: /home/runner/inotifywait-log-RunOnMacOs.csv + name: RunOnMacOs + RunOnWindows: + runs-on: windows-latest + steps: + - name: Setup Python 3.10 + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Install dependencies + run: |- + python -m pip install --upgrade pip + pip install inotify + - name: Run inotifywait + run: |- + python3 -c " + import inotify.adapters + import inotify.constants + import os + from datetime import datetime, timezone + with open('/home/runner/inotifywait-log-RunOnWindows.csv', 'w') as log_file: + i = inotify.adapters.InotifyTree('/home/runner/work/async-http-client/async-http-client', inotify.constants.IN_CREATE | inotify.constants.IN_ACCESS) + for event in i.event_gen(yield_nones=False): + (_, type_names, path, filename) = event + now = datetime.now(timezone.utc).strftime('%Y-%m-%dT%H:%M:%S.%f') + 'Z' + events = ','.join(type_names) + log_file.write(f'{now};{path};{filename};{events}\n') + log_file.flush() + os.fsync(log_file.fileno()) + " & + - uses: actions/checkout@v4 + - run: touch optcd-3.txt + - uses: actions/setup-java@v4 + with: + distribution: corretto + java-version: '11' + - run: touch optcd-4.txt + - name: Run Tests + run: ./mvnw.cmd -B -ntp clean test + - run: touch optcd-5.txt + - name: Upload inotifywait logs + uses: actions/upload-artifact@v4 + with: + name: inotifywait-RunOnWindows + path: /home/runner/inotifywait-log-RunOnWindows.csv + name: RunOnWindows +'on': +- push +- workflow_dispatch