Skip to content

Commit bcca2d7

Browse files
Refactor GitHub Actions workflow for C/C++
Removed macOS dependency installation and test steps, added artifact upload and optional clean step.
1 parent d50e820 commit bcca2d7

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

.github/workflows/c-cpp.yml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,21 @@ jobs:
2222
sudo apt-get update
2323
sudo apt-get install -y build-essential
2424
25-
- name: Install dependencies (macOS)
26-
if: runner.os == 'macOS'
27-
run: |
28-
brew install make
29-
3025
- name: Build with Make
3126
working-directory: ./mas
27+
shell: bash
3228
run: make
3329

34-
- name: Test executable exists
35-
working-directory: ./mas
30+
- name: Upload executable as artifact
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: mas-${{ runner.os }}
34+
path: |
35+
maw/mas
36+
maw/mas.exe
37+
if-no-files-found: ignore # OK if one is missing
38+
39+
- name: Clean (optional)
40+
working-directory: ./maw
3641
shell: bash
37-
run: |
38-
if [ ! -f "mas.exe" ]; then
39-
echo "Build failed: mas.exe not found"
40-
exit 1
41-
fi
42-
43-
- name: Clean build artifacts
44-
working-directory: ./mas
4542
run: make clean

0 commit comments

Comments
 (0)