Skip to content

Commit fcf01a6

Browse files
committed
Fixes
1 parent 6057c98 commit fcf01a6

File tree

3 files changed

+65
-118
lines changed

3 files changed

+65
-118
lines changed

.github/workflows/build-docker.yml

Lines changed: 0 additions & 64 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 63 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Build
22

3-
#on:
4-
# push:
5-
# branches:
6-
# - main
3+
on:
4+
push:
5+
branches:
6+
- main
77

88
jobs:
99
run-tests-and-examples:
@@ -19,63 +19,76 @@ jobs:
1919
python-version: ${{ matrix.python-version }}
2020
- name: Install wrench-daemon
2121
run: |
22-
cd /tmp/
23-
pip install jsonref
24-
sudo apt-get update
25-
sudo apt-get -y install gcc
26-
sudo apt-get -y install libasio-dev
27-
sudo apt-get -y install libboost-all-dev
28-
wget https://github.com/nlohmann/json/archive/refs/tags/v3.10.5.tar.gz
29-
tar -xf v3.10.5.tar.gz
30-
cd json-3.10.5
31-
cmake .
32-
make -j4
33-
sudo make install
34-
cd ..
35-
wget --no-check-certificate https://framagit.org/simgrid/simgrid/-/archive/v3.36/simgrid-v3.36.tar.gz
36-
tar -xf simgrid-v3.36.tar.gz
37-
cd simgrid-v3.36
38-
cmake -Denable_documentation=OFF .
39-
make -j4
40-
sudo make install
41-
cd ..
42-
git clone https://github.com/wrench-project/wrench.git
43-
cd wrench
44-
cmake .
45-
make -j4 wrench-daemon
46-
sudo make install
47-
cd ..
48-
cd
49-
# WITH DOCKER BELOW
50-
#curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
51-
#sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
22+
# WITHOUT DOCKER
23+
#cd /tmp/
24+
#pip install jsonref
5225
#sudo apt-get update
53-
#sudo apt-get install -y docker-ce docker-ce-cli containerd.io
54-
#docker pull wrenchproject/wrench:unstable
26+
#sudo apt-get -y install gcc
27+
#sudo apt-get -y install libasio-dev
28+
#sudo apt-get -y install libboost-all-dev
29+
#wget https://github.com/nlohmann/json/archive/refs/tags/v3.10.5.tar.gz
30+
#tar -xf v3.10.5.tar.gz
31+
#cd json-3.10.5
32+
#cmake .
33+
#make -j4
34+
#sudo make install
35+
#cd ..
36+
#wget --no-check-certificate https://framagit.org/simgrid/simgrid/-/archive/v3.36/simgrid-v3.36.tar.gz
37+
#tar -xf simgrid-v3.36.tar.gz
38+
#cd simgrid-v3.36
39+
#cmake -Denable_documentation=OFF .
40+
#make -j4
41+
#sudo make install
42+
#cd ..
43+
#git clone https://github.com/wrench-project/wrench.git
44+
#cd wrench
45+
#cmake .
46+
#make -j4 wrench-daemon
47+
#sudo make install
48+
#cd ..
49+
#cd
50+
# END WITHOUT DOCKER
51+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
52+
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
53+
sudo apt-get update
54+
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
55+
docker pull wrenchproject/wrench:unstable
5556
- name: Start wrench-daemon
5657
run: |
57-
export LD_LIBRARY_PATH=/usr/local/lib/
58-
wrench-daemon &
59-
#docker run -p 8101:8101 wrenchproject/wrench:unstable wrench-daemon &
60-
echo "PID=$!" >> $GITHUB_ENV
58+
# WITHOUT DOCKER
59+
#export LD_LIBRARY_PATH=/usr/local/lib/
60+
#wrench-daemon &
61+
#echo "PID=$!" >> $GITHUB_ENV
62+
# END WITHOUT DOCKER
63+
docker run --name wrench-daemon-container -v `pwd`:/home/wrench wrenchproject/wrench:unstable wrench-daemon &
6164
- name: Install the wrench Python API
6265
run: |
63-
pip install .
66+
# WIThOUT DOCKER
67+
#pip install .
68+
# END WITHOUT DOCKER
69+
docker exec --workdir /home/wrench/ wrench-daemon-container sudo pip install .
6470
- name: Run all tests
6571
run: |
66-
echo `pwd`
67-
echo `ls`
68-
cd tests
69-
bash ./run_all_tests.sh
70-
cd ..
72+
# WITHOUT DOCKER
73+
#cd tests
74+
#bash ./run_all_tests.sh
75+
#cd ..
76+
# END WITHOUT DOCKER
77+
docker exec --workdir /home/wrench/tests wrench-daemon-container bash ./run_all_tests.sh
7178
- name: Run all examples
7279
run: |
73-
cd examples
74-
bash ./run_all_examples.sh
75-
cd ..
80+
# WITHOUT DOCKER
81+
#cd examples
82+
#bash ./run_all_examples.sh
83+
#cd ..
84+
# END WITHOUT DOCKER
85+
docker exec --workdir /home/wrench/examples wrench-daemon-container bash ./run_all_examples.sh
7686
- name: Kill wrench-daemon
7787
run: |
78-
kill ${{ env.PID }} || true
88+
# WITHOUT DOCKER
89+
#kill ${{ env.PID }} || true
90+
# END WITHOUT DOCKER
91+
docker kill wrench-daemon-container
7992
build-documentation:
8093
runs-on: ubuntu-latest
8194
strategy:

tests/bare_metal_compute_service_test.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
simulation = wrench.Simulation()
2121
simulation.start(platform_file_path, "ControllerHost")
2222

23-
raise Exception("TEST")
24-
2523
print(f"New simulation, time is {simulation.get_simulated_time()}")
2624
hosts = simulation.get_all_hostnames()
2725
print(f"Hosts in the platform are: {hosts}")
@@ -81,12 +79,12 @@
8179
print("Looking up an entry to the file registry service, just for kicks")
8280
answer = frs.lookup_entry(file1)
8381
if answer != [ss]:
84-
raise "Error while looking up entry in file registry service"
82+
raise wrench.WRENCHException("Error while looking up entry in file registry service")
8583
print("Removing an entry to the file registry service, just for kicks")
8684
frs.remove_entry(ss, file1)
8785
answer = frs.lookup_entry(file1)
8886
if answer != []:
89-
raise "Error while looking up entry in file registry service"
87+
raise wrench.WRENCHException("Error while looking up entry in file registry service")
9088

9189
print("Creating a standard job with both tasks, but that doesn't specify file locations")
9290
job = simulation.create_standard_job([task1, task2], {})

0 commit comments

Comments
 (0)