-
Notifications
You must be signed in to change notification settings - Fork 6
116 lines (94 loc) · 3.46 KB
/
tests.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
on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-examples-linux:
runs-on: ubuntu-latest
env:
ROC_VERSION: nightly
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Update apt-get
run: sudo apt-get update
- name: Install Build Essentials
run: sudo apt install build-essential git
- name: Install Rust and Cargo
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
- name: Install ROC
run: |
# Install ROC
curl -fOL https://github.com/roc-lang/roc/releases/download/${ROC_VERSION}/roc_nightly-linux_x86_64-latest.tar.gz
mv $(ls | grep "roc_nightly.*tar\.gz") roc_nightly.tar.gz
tar -xzf roc_nightly.tar.gz
rm roc_nightly.tar.gz
mv roc_nightly* roc_nightly
- name: Check ROC version
run: ./roc_nightly/roc version
- name: Run all tests
run: ROC=./roc_nightly/roc ./ci/all_tests.sh
test-examples-macos:
runs-on: macos-latest
env:
ROC_VERSION: nightly
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Build Essentials
run: brew install automake autoconf libtool
- name: Install Rust and Cargo
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
- name: Install ROC
run: |
# Install ROC
curl -fOL https://github.com/roc-lang/roc/releases/download/${ROC_VERSION}/roc_nightly-macos_apple_silicon-latest.tar.gz
mv $(ls | grep "roc_nightly.*tar\.gz") roc_nightly.tar.gz
tar -xzf roc_nightly.tar.gz
rm roc_nightly.tar.gz
mv roc_nightly* roc_nightly
- name: Check ROC version
run: ./roc_nightly/roc version
- name: Run all tests
run: ROC=./roc_nightly/roc ./ci/all_tests.sh
test-examples-windows:
runs-on: windows-latest
env:
ROC_VERSION: nightly
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install ROC
run: |
# Install ROC
Invoke-WebRequest -Uri "https://github.com/lukewilliamboswell/roc/releases/download/windows-20241011/roc.exe" -OutFile "roc.exe"
- name: Check ROC version
run: .\roc.exe version
- name: Install GLFW
run: |
curl -L https://github.com/glfw/glfw/releases/download/3.4/glfw-3.4.bin.WIN64.zip --output glfw-3.4.bin.WIN64.zip
tar -xf glfw-3.4.bin.WIN64.zip
move glfw-3.4.bin.WIN64/lib-vc2022/glfw3_mt.lib ./glfw3_mt.lib
move glfw-3.4.bin.WIN64/include/GLFW ./GLFW
- name: Set environment variables for GLFW
run: |
$env:LIB = "${{ github.workspace }};$env:LIB"
$env:INCLUDE = "${{ github.workspace }};$env:INCLUDE"
- name: Build the basic-shapes example
run: |
.\roc.exe build --no-link --optimize --output=app.obj .\examples\basic-shapes.roc
cargo build
- name: Build the 2d_camera example
run: |
.\roc.exe build --no-link --optimize --output=app.obj .\examples\2d_camera.roc
cargo build
- name: Build the pong example
run: |
.\roc.exe build --no-link --optimize --output=app.obj .\examples\pong.roc
cargo build