-
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (64 loc) · 2.36 KB
/
test.yml
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
name: Test
on:
push:
branches: ['main', 'release-*']
paths-ignore: ['**/*.md', '**/*.yml', 'packages/**/*', '!.github/workflows/test.yml']
pull_request:
paths-ignore: ['**/*.md', '**/*.yml', 'packages/**/*', '!.github/workflows/test.yml']
concurrency:
cancel-in-progress: true
group: test-${{ github.event.pull_request.number || github.sha }}
jobs:
test:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- os: macos-11
platform: macos
generator: Ninja
- os: macos-12
platform: macos
generator: Ninja
- os: macos-13
platform: macos
generator: Ninja
- os: ubuntu-20.04
platform: linux
generator: Ninja
memcheck: memcheck
- os: ubuntu-22.04
platform: linux
generator: Ninja
memcheck: memcheck
- os: windows-2022
platform: windows
generator: Visual Studio 17 2022
steps:
- uses: actions/checkout@v4
- uses: thelang-io/setup-the@v1
- if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install ninja-build valgrind
- if: runner.os == 'macOS'
run: brew install ninja
- if: runner.os != 'Windows'
run: uname -a
- run: the -v
- run: the run scripts/pre-process-codegen
- run: curl -fsSL https://cdn.thelang.io/deps.tar.gz -o deps.tar.gz
- run: tar -xzf deps.tar.gz the/native/${{ matrix.config.platform }}
- if: runner.os == 'Linux'
run: echo "DEPS_DIR=$PWD/the/native/${{ matrix.config.platform }}" >> $GITHUB_ENV
- if: runner.os == 'macOS'
run: echo "DEPS_DIR=$PWD/the/native/${{ matrix.config.platform }}/x86_64" >> $GITHUB_ENV
- if: runner.os == 'Windows'
run: echo "DEPS_DIR=$PWD/the/native/${{ matrix.config.platform }}" | Out-File -FilePath $env:GITHUB_ENV -Append
- if: matrix.config.memcheck != 'memcheck'
run: cmake . -B ./build -G "${{ matrix.config.generator }}" -D BUILD_TESTS=ON
- if: matrix.config.memcheck == 'memcheck'
run: cmake . -B ./build -G "${{ matrix.config.generator }}" -D BUILD_TESTS=ON -D TEST_CODEGEN_MEMCHECK=ON
- run: cmake --build build
- run: ctest --output-on-failure --test-dir build