Skip to content

Update makefile.yml #13

Update makefile.yml

Update makefile.yml #13

Workflow file for this run

name: Build and Test ch01_bootsector
on:
push:
branches: [ "main", "ci" ]
pull_request:
branches: [ "main", "ci" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up environment
run: |
export CHOOSENIM_NO_ANALYTICS=1
export CHOOSENIM_CHOOSE_VERSION=stable
curl -sL https://nim-lang.org/choosenim/init.sh | sh -s -- -y
# Add Nimble binaries to PATH
export PATH="$HOME/.nimble/bin:$PATH"
sudo apt-get update
sudo apt-get install -y nasm make xxd gcc
- name: Checkout code 2
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libncurses5 libx11-dev libxext-dev libxrender-dev libxrandr-dev libxfixes-dev
- name: Install FreeBASIC
run: |
FB_VERSION="1.10.0"
curl -LO "https://github.com/freebasic/fbc/releases/download/${FB_VERSION}/fbc_linux-x86_64-${FB_VERSION}.tar.xz"
tar -xf "fbc_linux-x86_64-${FB_VERSION}.tar.xz" -C /opt
export PATH="/opt/fbc:${PATH}"
fbc --version
# Install V
curl -s https://raw.githubusercontent.com/vlang/v/master/install.sh | bash
export PATH="$HOME/.vlang/bin:$PATH"
echo "Environment setup completed."
- name: Build and Test in Subdirectories
run: |
for dir in ch01_bootsector/*; do
if [ -d "$dir" ]; then
echo "Building in directory: $dir"
cd "$dir"
make clean || true
make || { echo "Build failed in $dir"; exit 1; }
echo "Build succeeded in $dir"
cd -
fi
done