Apply .gitignore #1
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
name: Pintos Docker Build and Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# 1. Checkout the repository | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# 2. Set up Docker Buildx | |
- name: Setup Docker BuildX | |
uses: docker/setup-buildx-action@v3 | |
# 3. Build the Docker image | |
- name: Build Pintos Docker Image | |
run: | | |
docker buildx build \ | |
--platform linux/amd64 \ | |
--tag pintos-build:latest \ | |
--load \ | |
. | |
# 4. Run Pintos build inside the container | |
- name: Run Pintos Build Checks | |
run: | | |
docker run --rm \ | |
-v ${{ github.workspace }}:/pintos \ | |
-w /pintos \ | |
pintos-build:latest \ | |
bash -c " | |
cd src/threads && make clean && make && | |
cd ../userprog && make clean && make && | |
cd ../filesys && make clean && make" |