Skip to content

Commit 2797352

Browse files
committed
cmake update
1 parent 8794e66 commit 2797352

File tree

14 files changed

+138
-31
lines changed

14 files changed

+138
-31
lines changed

.github/ctest.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: C++ CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v3
16+
17+
- name: Set up dependencies
18+
run: |
19+
sudo apt-get update
20+
sudo apt-get install -y g++ make
21+
22+
- name: Build
23+
run: |
24+
make all
25+
26+
- name: Run executable
27+
run: |
28+
# Example execution; adjust arguments as needed
29+
./lab4 trace 1,2-4,3 100 3 \
30+
P1,0,5 P2,2,3 P3,4,2
31+
32+
- name: Verify build artifacts
33+
run: |
34+
# Verify that the executable exists and is executable
35+
if [ ! -x ./cpu-scheduler ]; then echo "Executable not found" && exit 1; fi

.github/workflows/c-cpp.yml

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

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ An implementation of various CPU scheduling algorithms in C++. The algorithms in
1414
- [Aging](#aging)
1515
- [Installation](#installation)
1616
- [Input Format](#input-format)
17-
- [Contributors](#contributors)
17+
1818

1919
## Algorithms
2020

@@ -132,9 +132,4 @@ entered as 2-4 means Round Robin with q=4. Also, policy 8-1 means Aging with q=1
132132
> Check the attached [testcases](https://github.com/yousefkotp/CPU-Scheduling-Algorithms/tree/main/testcases) for more details.
133133
134134

135-
## Contributors
136135

137-
- [Yousef Kotp](https://github.com/yousefkotp)
138-
139-
- [Adham Mohammed](https://github.com/adhammohamed1)
140-
# Project-Schedule

build/.dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Use an official Ubuntu base image 24 LTS
2+
FROM ubuntu:24.04
3+
4+
5+
# Installing dependencies
6+
RUN apt-get update && apt-get install -y \
7+
g++ \
8+
make \
9+
&& rm -rf /var/lib/apt/lists/*
10+
11+
# Setting working directory
12+
WORKDIR /app
13+
14+
# Copy source code into the container
15+
COPY . .
16+
17+
# Build the project
18+
RUN make
19+
20+
# Command to run the application
21+
CMD ["./lab4"]

build/.dockerignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.o
2+
*.a
3+
*.so
4+
*.exe
5+
*.out
6+
*.app
7+
build/
8+
.vscode/
9+
*.swp

gtest/hello_gtest.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include <gtest/gtest.h>
2+
3+
TEST(HelloTest, BasicAssertions) {
4+
EXPECT_EQ(1 + 1, 2);
5+
EXPECT_TRUE(true);
6+
}
7+
8+
int main(int argc, char **argv) {
9+
::testing::InitGoogleTest(&argc, argv);
10+
return RUN_ALL_TESTS();
11+
}

lab4

-270 KB
Binary file not shown.

parser.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
#include <linux/limits.h>
2+
#include <bits/stdc++.h>
3+
4+
using namespace std;
5+
16
#ifndef PARSER_H_INCLUDED
27
#define PARSER_H_INCLUDED
38

4-
#include <bits/stdc++.h>
59

6-
using namespace std;
710

811
/** This file handles parsing the data we are going to work with **/
912
/** It also holds all the global variables we parse into **/
@@ -40,6 +43,7 @@ void parse_algorithms(string algorithm_chunk)
4043
}
4144
}
4245

46+
4347
void parse_processes()
4448
{
4549
string process_chunk, process_name;
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)