-
-
Notifications
You must be signed in to change notification settings - Fork 34
116 lines (108 loc) · 3.52 KB
/
burrito-xcomp-check.yaml
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: "Burrito Cross Build Build Tests"
on:
pull_request:
push:
branches: main
jobs:
build_examples:
name: build_examples_${{ matrix.host }}
runs-on: ${{ matrix.host }}
strategy:
matrix:
host: [ubuntu-latest, macos-latest]
steps:
# Deps
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
if: matrix.host == 'ubuntu-latest'
with:
otp-version: 26.2.1
elixir-version: 1.16.2
- uses: goto-bus-stop/setup-zig@v2
with:
version: 0.13.0
- name: Set up Homebrew
if: matrix.host == 'macos-latest'
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- run: sudo apt-get -y install xz-utils
if: matrix.host == 'ubuntu-latest'
- run: brew install elixir xz
if: matrix.host == 'macos-latest'
# Restore Cache
- uses: actions/cache/restore@v3
if: matrix.host == 'ubuntu-latest'
id: cache-restore-linux
with:
path: /home/runner/.cache/burrito_file_cache/
key: burrito-download-cache_${{ matrix.host }}
- uses: actions/cache/restore@v3
if: matrix.host == 'macos-latest'
id: cache-restore-macos
with:
path: /Users/runner/Library/Caches/burrito_file_cache/
key: burrito-download-cache_${{ matrix.host }}
# Build Example CLI App
- name: cli_example
working-directory: "./examples/cli_example"
run: "mix deps.get && mix release"
# Save Cache (Linux)
- uses: actions/cache/save@v3
if: matrix.host == 'ubuntu-latest'
id: cache-save-linux
with:
path: /home/runner/.cache/burrito_file_cache/
key: burrito-download-cache_${{ matrix.host }}
# Save Cache (macOS)
- uses: actions/cache/save@v3
if: matrix.host == 'macos-latest'
id: cache-save-macos
with:
path: /Users/runner/Library/Caches/burrito_file_cache/
key: burrito-download-cache_${{ matrix.host }}
# Upload Wrapped Binaries
- name: Upload Binaries
uses: actions/upload-artifact@v4
with:
name: burrito_${{ matrix.host }}_host_bins
path: ./examples/**/burrito_out/*
retention-days: 1
#### Run example binaries ####
run_examples_windows:
strategy:
matrix:
host: [ubuntu-latest, macos-latest]
runs-on: windows-latest
needs: build_examples
steps:
- name: Download a single artifact
uses: actions/download-artifact@v4
with:
name: burrito_${{ matrix.host }}_host_bins
- run: cli_example/burrito_out/example_cli_app_windows.exe
run_examples_linux:
strategy:
matrix:
host: [ubuntu-latest, macos-latest]
runs-on: ubuntu-latest
needs: build_examples
steps:
- name: Download a single artifact
uses: actions/download-artifact@v4
with:
name: burrito_${{ matrix.host }}_host_bins
- run: chmod +x cli_example/burrito_out/example_cli_app_linux
- run: cli_example/burrito_out/example_cli_app_linux
run_examples_macos:
strategy:
matrix:
host: [ubuntu-latest, macos-latest]
runs-on: macos-latest
needs: build_examples
steps:
- name: Download a single artifact
uses: actions/download-artifact@v4
with:
name: burrito_${{ matrix.host }}_host_bins
- run: chmod +x cli_example/burrito_out/example_cli_app_macos
- run: cli_example/burrito_out/example_cli_app_macos