forked from pegasusplus/tinyos
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (50 loc) · 1.8 KB
/
makefile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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