-
Notifications
You must be signed in to change notification settings - Fork 18
81 lines (66 loc) · 2.42 KB
/
ci.yml
File metadata and controls
81 lines (66 loc) · 2.42 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
on:
pull_request:
workflow_dispatch:
# this cancels workflows currently in progress if you start a new one
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Do not add permissions here! Configure them at the job level!
permissions: {}
env:
JUMP_START: 1
ROC: roc
EXAMPLES_DIR: ./examples/
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm, macos-15]
steps:
- uses: actions/checkout@v4
- uses: roc-lang/setup-roc@39c354a6a838a0089eea9068a0414f49b62c5c08
with:
# Note: nightly hashes are not verified because they are updated regularly.
version: nightly
- run: roc version
- name: Install dependencies (Ubuntu)
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt install -y expect ncat ripgrep
- name: Install dependencies (macOS)
if: startsWith(matrix.os, 'macos-')
run: |
brew install expect # expect for testing
brew install nmap # includes ncat, for use as test server for tests/tcp.roc
brew install ripgrep # ripgrep for ci/check_all_exposed_funs_tested.roc
# Run all tests
- run: ./ci/all_tests.sh
- name: Install dependencies for musl build
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt-get install -y musl-tools
if [[ "${{ matrix.os }}" == *"-arm" ]]; then
# TODO re-enable once TODOs below are gone: rustup target add aarch64-unknown-linux-musl
echo "no-op"
else
rustup target add x86_64-unknown-linux-musl
fi
- name: Test building with musl target
if: startsWith(matrix.os, 'ubuntu-')
run: |
if [[ "${{ matrix.os }}" == *"-arm" ]]; then
# TODO debug this: CARGO_BUILD_TARGET=aarch64-unknown-linux-musl roc build.roc -- --roc roc
echo "no-op"
else
CARGO_BUILD_TARGET=x86_64-unknown-linux-musl roc build.roc -- --roc roc
fi
- name: Test using musl build
if: startsWith(matrix.os, 'ubuntu-')
run: |
# TODO remove `if` when above TODOs are done
if [[ "${{ matrix.os }}" != *"-arm" ]]; then
# no need to build platform anymore
NO_BUILD=1 IS_MUSL=1 ./ci/all_tests.sh
fi
# TODO clippy, rustfmt, roc fmt check