Merge pull request #112 from matushorvath/npm-update #858
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: Build and Test | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
FORCE_COLOR: 1 | |
TERM: xterm-color | |
CC: gcc | |
jobs: | |
build: | |
name: OS=${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
steps: | |
- name: Checkout vm8086 | |
uses: actions/checkout@v4 | |
with: | |
path: vm8086 | |
- name: Checkout xzintbit | |
uses: actions/checkout@v4 | |
with: | |
repository: matushorvath/xzintbit | |
path: xzintbit | |
- name: Build xzintbit | |
working-directory: xzintbit | |
env: | |
CC: gcc | |
run: make build-vm | |
- name: Checkout 8088_bios | |
uses: actions/checkout@v4 | |
with: | |
repository: skiselev/8088_bios | |
path: 8088_bios | |
- name: Install nasm | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" | |
brew install nasm | |
echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH | |
elif [ "$RUNNER_OS" == "Windows" ]; then | |
choco install nasm | |
echo "C:\Program Files\NASM" >> $GITHUB_PATH | |
elif [ "$RUNNER_OS" == "macOS" ]; then | |
brew install nasm | |
fi | |
shell: bash | |
- name: Install bochs | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
sudo apt install -y bochs bochs-term bochsbios vgabios | |
elif [ "$RUNNER_OS" == "macOS" ]; then | |
brew install bochs | |
fi | |
shell: bash | |
if: matrix.os != 'windows-latest' | |
- name: Build | |
working-directory: vm8086 | |
run: make build-all | |
- name: Test | |
working-directory: vm8086 | |
run: make test | |
- name: Validate | |
working-directory: vm8086 | |
run: make validate | |
if: matrix.os != 'windows-latest' |