File tree Expand file tree Collapse file tree 1 file changed +14
-13
lines changed
Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change 22
33name : C++ CI
44
5- # This action will trigger on every push to the main branch
65on :
76 push :
87 branches : [ "main" ]
1110
1211jobs :
1312 build :
14- # Use the latest version of Ubuntu as the runner
1513 runs-on : ubuntu-latest
1614
1715 steps :
18- # 1. Check out your repository code so the workflow can access it
16+ # 1. Check out your repository code
1917 - name : Checkout code
2018 uses : actions/checkout@v4
2119
22- # 2. The build step
23- - name : Build the project
24- run : |
25- echo "Starting build..."
26- g++ -std=c++17 -pthread -Iinclude src/*.cpp -o hybrid_cache
27- echo "Build finished."
20+ # 2. Cache the 'obj' directory (Optional but recommended)
21+ - name : Cache build objects
22+ id : cache-objects
23+ uses : actions/cache@v4
24+ with :
25+ path : obj
26+ key : ${{ runner.os }}-build-${{ hashFiles('**/Makefile', '**/src/*.cpp', '**/include/*.h') }}
2827
29- # 3. (Optional) A step to run your executable to make sure it works
28+ # 3. Build the project using the Makefile
29+ - name : Build with make
30+ run : make
31+
32+ # 4. Run the program with a capacity argument
3033 - name : Run the program
31- run : |
32- echo "Running executable..."
33- ./hybrid_cache
34+ run : ./bin/hybrid_cache 10 # <-- THE FIX IS HERE
You can’t perform that action at this time.
0 commit comments