Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My work #694

Merged
merged 13 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
final testst for tonight
  • Loading branch information
ribalba committed Feb 26, 2024
commit dc26c90d05e8edbe0772c49830b2b9dab46840fd
4 changes: 1 addition & 3 deletions .github/actions/gmt-pytest/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,12 @@ runs:
path: venv
key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ hashFiles('metric_providers/psu/energy/ac/xgboost/machine/model/requirements.txt') }}

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3

- name: install script and packages
shell: bash
working-directory: ${{ inputs.gmt-directory }}
run: |
./install_mac.sh -p testpw -a http://api.green-coding.internal:9142 -m http://metrics.green-coding.internal:9142
source venv/bin/activate && pip install -r requirements-dev.txt

- name: Start Test container
shell: bash
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ jobs:
with:
colima-network-address: 'true'

- name: Verify Docker installation
run: |
docker --version
docker run hello-world

- name: 'Setup, Run, and Teardown Tests'
uses: ./.github/actions/gmt-pytest
with:
Expand Down
4 changes: 2 additions & 2 deletions install_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ echo "ALL ALL=(ALL) NOPASSWD:/usr/bin/killall powermetrics" | sudo tee /etc/sudo
echo "ALL ALL=(ALL) NOPASSWD:/usr/bin/killall -9 powermetrics" | sudo tee /etc/sudoers.d/green_coding_kill_powermetrics_sigkill

print_message "Writing to /etc/hosts file..."
etc_hosts_line_1="127.0.0.1 green-coding-postgres-container"
etc_hosts_line_2="127.0.0.1 ${host_api_url} ${host_metrics_url}"
etc_hosts_line_1="192.168.106.2 green-coding-postgres-container"
etc_hosts_line_2="192.168.106.2 ${host_api_url} ${host_metrics_url}"

# Entry 1 is needed for the local resolution of the containers through the jobs.py and runner.py
if ! sudo grep -Fxq "$etc_hosts_line_1" /etc/hosts; then
Expand Down
4 changes: 2 additions & 2 deletions runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def __init__(self,
self._uri_type = uri_type
self._original_filename = filename
self._branch = branch
self._tmp_folder = '/tmp/green-metrics-tool'
self._tmp_folder = '/Users/runner/tmp/green-metrics-tool'
self._usage_scenario = {}
self._architecture = utils.get_architecture()
self._sci = {'R_d': None, 'R': 0}
Expand Down Expand Up @@ -532,7 +532,7 @@ def build_docker_images(self):

# Create directory /tmp/green-metrics-tool/docker_images
temp_dir = f"{self._tmp_folder}/docker_images"
self.initialize_folder(temp_dir)
self._tmp_folder(temp_dir)

# technically the usage_scenario needs no services and can also operate on an empty list
# This use case is when you have running containers on your host and want to benchmark some code running in them
Expand Down