From 35cb7ac1cbea59d912f23a57f5f6e8ca561c7c4b Mon Sep 17 00:00:00 2001 From: Wiktor Trybus Date: Sun, 10 May 2026 16:10:48 +0200 Subject: [PATCH 1/2] Build job setup in GH Actions. --- .github/workflows/make.yml | 62 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/make.yml diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml new file mode 100644 index 0000000..a22281e --- /dev/null +++ b/.github/workflows/make.yml @@ -0,0 +1,62 @@ +name: CI - Operating Systems Laboratories + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install build dependencies + run: | + sudo apt-get update + sudo apt-get install -y build-essential libpthread-stubs0-dev + + - name: Build Lab 1 (Manual & Makefile) + run: | + cd lab1 + if [ -d "zad1" ]; then gcc -Wall zad1/main.c -o zad1/main.out; fi + if [ -f "zad2/Makefile" ]; then cd zad2 && make && cd ..; fi + if [ -f "zad3/Makefile" ]; then cd zad3 && make && cd ..; fi + cd .. + + - name: Build Lab 2 (Signals & Libraries) + run: | + cd lab2 + make all + + - name: Build Lab 3 (Pipes & FIFOs) + run: | + cd lab3 + make all + + - name: Build Lab 4 (Message Queues) + run: | + cd lab4 + make all + + - name: Build Lab 5 (Semaphores & Shared Memory) + run: | + for d in lab5/zad*/; do + if [ -f "$d/Makefile" ]; then + echo "Building $d" + cd "$d" && make all && cd - + fi + done + + - name: Verify IPC Cleanup Utilities + run: | + if [ -f "lab5/zad3/bin/cleaner.out" ]; then + ./lab5/zad3/bin/cleaner.out + fi + + - name: Success Notification + run: echo "All laboratories compiled successfully!" + \ No newline at end of file From 5f6bca4f5614c36d0611532c24fd0025fe1c06bb Mon Sep 17 00:00:00 2001 From: Wiktor Trybus Date: Sun, 10 May 2026 16:16:34 +0200 Subject: [PATCH 2/2] Fixed mistakes regarding lab2 compilation in 'make.yml' --- .github/workflows/make.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index a22281e..fe3a186 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -29,8 +29,11 @@ jobs: - name: Build Lab 2 (Signals & Libraries) run: | - cd lab2 - make all + cd lab1 + if [ -d "zad1" ]; then gcc -Wall zad1/main.c -o zad1/main.out; fi + if [ -d "zad2" ]; then gcc -Wall zad2/main.c -o zad1/main.out && gcc zad2/child.c -o child.out; fi + if [ -f "zad3/Makefile" ]; then cd zad3 && make && cd ..; fi + cd .. - name: Build Lab 3 (Pipes & FIFOs) run: |