-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Travis build since Github actions doesnt seem to support accessabilit…
…y needed for osascript
- Loading branch information
Showing
6 changed files
with
61 additions
and
17 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
os: osx | ||
|
||
addons: | ||
homebrew: | ||
packages: | ||
- zig | ||
- coreutils # gtimeout | ||
casks: | ||
- textmate | ||
|
||
script: | | ||
# "install" bundle | ||
mkdir -p "$HOME/Library/Application Support/TextMate/Bundles/" | ||
ln -s $PWD "$HOME/Library/Application Support/TextMate/Bundles/Zig.tmbundle" | ||
# run TextMate, capture output | ||
/Applications/TextMate.app/Contents/MacOS/TextMate | tee textmate.out & | ||
# don't expect the bundle to be mentioned in output as that would indicate an error | ||
! grep Zig.tmbundle textmate.out | ||
# open a sample source | ||
mate hello.zig | ||
# use Build command via keyboard shortcut | ||
osascript -e 'activate application "TextMate"' -e 'tell application "System Events" to keystroke "b" using command down' | ||
# wait for binary to be built | ||
gtimeout 30 /bin/sh -c 'while ! ls hello 2>/dev/null; do sleep 1; done' | ||
./hello | ||
# debugging | ||
# screencapture test.png; cat test.png | base64 | ||
osascript -e 'tell application "TextMate" to quit' |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
const std = @import("std"); | ||
|
||
pub fn main() !void { | ||
const stdout = &std.io.getStdOut().outStream().stream; | ||
try stdout.print("Hello, {}!\n", .{"world"}); | ||
// If this program is run without stdout attached, exit with an error. | ||
const stdout_file = try std.io.getStdOut(); | ||
// If this program encounters pipe failure when printing to stdout, exit | ||
// with an error. | ||
try stdout_file.write("Hello, world!\n"); | ||
} |
Empty file.