-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (83 loc) · 3.01 KB
/
Copy pathlinux.yml
File metadata and controls
98 lines (83 loc) · 3.01 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Appa Linux
on:
push:
branches: [main]
paths: ['src/**', 'tests/**', '*.csproj', '*.slnx', 'global.json', '.github/workflows/**']
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
Deploy_Linux:
name: Build & Test (Linux x64)
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Checkout Appa
uses: actions/checkout@v4
with:
path: Appa
- name: Checkout Gata (sibling, required by the execution tests)
uses: actions/checkout@v4
with:
repository: ApparentlyPlus/Gata
path: Gata
- name: Set up .NET 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Verify host C compilers
run: |
set -euo pipefail
fail=0
for cc in cc gcc clang; do
if "$cc" --version >/dev/null 2>&1; then
echo " ok $cc -> $("$cc" --version | head -1)"
else
echo " MISS $cc"; fail=1
fi
done
if [ -f Gata/libgata/List.g ] && [ -f Gata/envs/env.hosted.g ]; then
echo " ok sibling Gata checkout"
else
echo " MISS sibling Gata checkout"; fail=1
fi
[ "$fail" -eq 0 ] || { echo "::error::preconditions missing - tests would silently skip"; exit 1; }
- name: Restore
working-directory: Appa
run: dotnet restore
- name: Build
working-directory: Appa
run: dotnet build -c Release --no-restore
- name: Install the GatOS toolchain (for the boot tests)
working-directory: Appa
run: dotnet run --project Appa.csproj -c Release --no-build -- install --no-path --force
- name: Verify the boot tests will actually run
run: |
set -euo pipefail
root="$HOME/.local/share/appa"
gcc_bin="$root/toolchain/x86_64-linux/gcc/bin/x86_64-elf-gcc"
qemu="$root/toolchain/x86_64-linux/qemu/QEMU-x86_64.AppImage"
fail=0
for p in "$gcc_bin" "$qemu"; do
[ -f "$p" ] && echo " ok $p" || { echo " MISS $p"; fail=1; }
done
n=$(ls "$root"/libgata/*.g 2>/dev/null | wc -l || true)
[ "$n" -gt 0 ] && echo " ok libgata ($n modules)" || { echo " MISS libgata"; fail=1; }
[ "$fail" -eq 0 ] || { echo "::error::toolchain incomplete - BootTests would skip"; exit 1; }
- name: Test
working-directory: Appa
run: dotnet test --project tests/Appa.Tests.csproj -c Release --no-build
- name: Publish the native executable (linux-x64)
working-directory: Appa
run: dotnet publish /p:PublishProfile=Linux-x64
- name: Upload the executable
uses: actions/upload-artifact@v4
with:
name: appa-linux
path: Appa/publish/linux-x64/Appa
if-no-files-found: error