@@ -43,12 +43,14 @@ steps:
43
43
continueOnError : true
44
44
45
45
- script : |
46
+ set -euxo pipefail
46
47
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
47
48
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
48
49
condition : or(eq( variables['Agent.OS'], 'Linux' ), eq( variables['Agent.OS'], 'Darwin' ))
49
50
displayName : ' Install Rust (Linux/macOS)'
50
51
51
52
- script : |
53
+ set -euxo pipefail
52
54
curl -sSf -o rustup-init.exe https://win.rustup.rs
53
55
rustup-init.exe -y --default-toolchain %RUSTUP_TOOLCHAIN%
54
56
echo ##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin
65
67
displayName : ' Install Rustup Src Component'
66
68
67
69
- script : |
70
+ set -euxo pipefail
68
71
cargo install cargo-xbuild --debug
69
72
cargo install bootimage --debug
70
73
displayName : ' Install cargo-xbuild and bootimage'
74
77
displayName : ' Install QEMU (Linux)'
75
78
76
79
- script : |
80
+ set -euxo pipefail
77
81
export HOMEBREW_NO_AUTO_UPDATE=1
78
82
export HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK=1
79
83
export HOMEBREW_NO_INSTALL_CLEANUP=1
@@ -82,34 +86,29 @@ steps:
82
86
displayName : ' Install QEMU (macOS)'
83
87
84
88
- script : |
89
+ set -euxo pipefail
85
90
choco install qemu --limit-output --no-progress
86
91
echo ##vso[task.setvariable variable=PATH;]%PATH%;C:\Program Files\qemu
87
92
set PATH=%PATH%;C:\Program Files\qemu
88
93
qemu-system-x86_64 --version
89
94
condition : eq( variables['Agent.OS'], 'Windows_NT' )
90
95
displayName : ' Install QEMU (Windows)'
91
96
92
- - script : |
93
- cd example-kernel
94
- cargo xbuild --target x86_64-example-kernel.json
95
- cd ..
97
+ - script : cargo xbuild --target x86_64-example-kernel.json
98
+ workingDirectory : example-kernel
96
99
displayName : ' Build Example Kernel'
97
100
98
- - script : |
99
- cd builder
100
- cargo run -- --kernel ../example-kernel/target/x86_64-example-kernel/debug/example-kernel
101
- cd ..
101
+ - script : cargo run -- --kernel ../example-kernel/target/x86_64-example-kernel/debug/example-kernel
102
+ workingDirectory : builder
102
103
displayName : ' Build Bootloader'
103
104
104
105
- bash : |
105
106
qemu-system-x86_64 -drive format=raw,file=target/x86_64-bootloader/release/bootimage.bin -device isa-debug-exit,iobase=0xf4,iosize=0x04 -display none
106
107
if [ $? -eq 123 ]; then (exit 0); else (exit 1); fi
107
108
displayName : ' Test Bootloader'
108
109
109
- - script : |
110
- cd builder
111
- cargo run -- --kernel ../example-kernel/target/x86_64-example-kernel/debug/example-kernel --features vga_320x200
112
- cd ..
110
+ - script : cargo run -- --kernel ../example-kernel/target/x86_64-example-kernel/debug/example-kernel --features vga_320x200
111
+ workingDirectory : builder
113
112
displayName : ' Build Bootloader (Feature vga_320x200)'
114
113
115
114
- bash : |
0 commit comments