Update build.yml #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# see | |
# https://github.com/sarnobat/github_workflow_action_tutorial.c/blob/main/.github/workflows/cmake-multi-platform.yml | |
name: Build | |
on: | |
push: | |
branches: [ master, actionBuild ] # Or your main branch name | |
pull_request: | |
branches: [ master, actionBuild ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest # Or a specific OS if needed | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up dependencies (if any) | |
# Example: Install required packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y make gcc libncurses-dev libpcre3 libpcre3-dev | |
- name: Build with Make | |
run: | | |
./configure | |
make -j$(nproc) # -j$(nproc) for parallel builds | |
- name: Run tests (optional) | |
run: make test | |
- name: Upload artifacts (optional) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-artifacts | |
path: path/to/your/artifacts # Replace with actual path |