|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + |
| 6 | +jobs: |
| 7 | + build-and-compile: |
| 8 | + name: "Build & Compile" |
| 9 | + runs-on: ubuntu-latest |
| 10 | + steps: |
| 11 | + - uses: actions/checkout@v5 |
| 12 | + with: |
| 13 | + submodules: 'true' |
| 14 | + |
| 15 | + - uses: ./.github/actions/setup-effekt |
| 16 | + |
| 17 | + - name: Compile project |
| 18 | + run: sbt compile Test/compile |
| 19 | + |
| 20 | + - name: Cache compiled artifacts |
| 21 | + uses: actions/cache/save@v4 |
| 22 | + with: |
| 23 | + path: | |
| 24 | + target |
| 25 | + project/target |
| 26 | + project/project/target |
| 27 | + kiama/jvm/target |
| 28 | + kiama/js/target |
| 29 | + effekt/jvm/target |
| 30 | + effekt/js/target |
| 31 | + ~/.ivy2/cache |
| 32 | + ~/.sbt |
| 33 | + ~/.cache/coursier |
| 34 | + key: effekt-build-${{ github.sha }} |
| 35 | + |
| 36 | + internal-tests: |
| 37 | + name: "Internal Tests & Verify Binary" |
| 38 | + needs: build-and-compile |
| 39 | + runs-on: ubuntu-latest |
| 40 | + steps: |
| 41 | + - uses: actions/checkout@v5 |
| 42 | + with: |
| 43 | + submodules: 'true' |
| 44 | + |
| 45 | + - uses: ./.github/actions/setup-effekt |
| 46 | + |
| 47 | + - uses: ./.github/actions/restore-build-cache |
| 48 | + |
| 49 | + - name: Run internal tests |
| 50 | + run: | |
| 51 | + sbt kiamaJVM/test |
| 52 | + sbt effektJVM/testRemaining |
| 53 | + sbt effektJS/test |
| 54 | +
|
| 55 | + - name: Assemble fully optimized JS file |
| 56 | + run: sbt effektJS/fullOptJS |
| 57 | + |
| 58 | + - name: Install effekt binary |
| 59 | + run: sbt install |
| 60 | + |
| 61 | + - name: Test effekt binary |
| 62 | + run: effekt.sh --help |
| 63 | + |
| 64 | + windows-tests: |
| 65 | + name: "Windows Smoke Test" |
| 66 | + needs: build-and-compile |
| 67 | + runs-on: windows-latest |
| 68 | + steps: |
| 69 | + - uses: actions/checkout@v5 |
| 70 | + with: |
| 71 | + submodules: 'true' |
| 72 | + |
| 73 | + - uses: ./.github/actions/setup-effekt |
| 74 | + |
| 75 | + - name: Compile project |
| 76 | + run: sbt Test/compile |
| 77 | + |
| 78 | + - name: Run Windows smoke test |
| 79 | + run: sbt "effektJVM/testOnly effekt.JavaScriptTests -- --tests=.*examples[\\/]*pos[\\/]*sideeffects.*" |
| 80 | + |
| 81 | + js-tests: |
| 82 | + name: "JS Backend" |
| 83 | + needs: build-and-compile |
| 84 | + runs-on: ubuntu-latest |
| 85 | + steps: |
| 86 | + - uses: actions/checkout@v5 |
| 87 | + with: |
| 88 | + submodules: 'true' |
| 89 | + |
| 90 | + - uses: ./.github/actions/setup-effekt |
| 91 | + |
| 92 | + - uses: ./.github/actions/restore-build-cache |
| 93 | + |
| 94 | + - name: Run JavaScript backend tests |
| 95 | + run: sbt effektJVM/testBackendJS |
| 96 | + |
| 97 | + chez-tests: |
| 98 | + name: "Chez Backend" |
| 99 | + needs: build-and-compile |
| 100 | + runs-on: ubuntu-latest |
| 101 | + steps: |
| 102 | + - uses: actions/checkout@v5 |
| 103 | + with: |
| 104 | + submodules: 'true' |
| 105 | + |
| 106 | + - uses: ./.github/actions/setup-effekt |
| 107 | + with: |
| 108 | + install-dependencies: 'true' |
| 109 | + |
| 110 | + - uses: ./.github/actions/restore-build-cache |
| 111 | + |
| 112 | + - name: Run Chez Scheme backend tests |
| 113 | + run: sbt effektJVM/testBackendChez |
| 114 | + |
| 115 | + llvm-tests: |
| 116 | + name: "LLVM Backend" |
| 117 | + needs: build-and-compile |
| 118 | + runs-on: ubuntu-latest |
| 119 | + steps: |
| 120 | + - uses: actions/checkout@v5 |
| 121 | + with: |
| 122 | + submodules: 'true' |
| 123 | + |
| 124 | + - uses: ./.github/actions/setup-effekt |
| 125 | + with: |
| 126 | + install-dependencies: 'true' |
| 127 | + install-valgrind: 'true' |
| 128 | + |
| 129 | + - uses: ./.github/actions/restore-build-cache |
| 130 | + |
| 131 | + - name: Run LLVM backend tests |
| 132 | + run: EFFEKT_VALGRIND=1 EFFEKT_DEBUG=1 sbt effektJVM/testBackendLLVM |
0 commit comments