Update README.md #1132
This file contains hidden or 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
name: Build in Subdirectory | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up build tools | |
run: sudo apt-get update && sudo apt-get install -y gcc make | |
- name: List directory contents | |
run: ls -l workbook/ch03/make | |
- name: Navigate to subdirectory and build | |
working-directory: workbook/ch03/make | |
run: make build | |
- name: Run tests | |
working-directory: workbook/ch03/make | |
run: make test | grep "Hello, make!" | |
- name: Clean up | |
working-directory: workbook/ch03/make | |
run: make clean |