aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/test.yml
blob: 697b9d86a49e2249f23e228f28d6d6be20aa0059 (plain) (blame)
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: [ master, cjanet-jit ]
  pull_request:
    branches: [ master ]

jobs:
  test-posix:
    name: Build and test on POSIX systems
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ ubuntu-latest, macos-latest, macos-14 ]
        janet-version: [ heads/master, tags/v1.39.1, tags/v1.38.0, tags/v1.37.1, tags/v1.36.0 ]
    steps:
      - name: Checkout Janet
        uses: actions/checkout@v4
        with:
          repository: janet-lang/janet
          path: janet
          ref: refs/${{ matrix.janet-version }}
      - name: Build Janet
        run: cd janet && make clean && make && make test
      - name: Install Janet
        run: cd janet && sudo make install
      - name: Checkout the repository
        uses: actions/checkout@v4
        with:
          path: spork
      - name: Build Spork
        run: cd spork && janet -l ./bundle -e "(build)"
      - name: Test Install 
        run: sudo janet -e '(bundle/install "spork")'
      - name: Run Tests
        run: cd spork && VERBOSE=1 janet -l ./bundle -e "(check)"

  test-windows:
    name: Build and test on Windows
    strategy:
      matrix:
        os: [ windows-2022, windows-latest ]
        janet-version: [ 1.36.0, 1.37.1, 1.38.0, 1.39.1 ]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
        with:
          path: spork
      - name: Download Janet Latest Release
        shell: cmd
        run: curl -fSLo janet.msi https://github.com/janet-lang/janet/releases/download/v${{ matrix.janet-version }}/janet-${{ matrix.janet-version }}-windows-x64-installer.msi
      - name: Install Janet
        shell: cmd
        run: msiexec /quiet /i janet.msi ALLUSERS=1 /log install.log && type install.log
      - name: Build Spork
        shell: cmd
        run: |
          refreshenv & cd spork & janet -l ./bundle -e "(do (setdyn :verbose true) (build))"
      - name: Test Install 
        shell: cmd
        run: |
          refreshenv & janet -e "(bundle/install `spork`)"
      - name: Run Tests
        shell: cmd
        run: |
          refreshenv & cd spork & janet -l ./bundle -e "(check)"