|
12 | 12 | fail-fast: false
|
13 | 13 | matrix:
|
14 | 14 | os: [macos-latest, ubuntu-latest, windows-latest]
|
| 15 | + # weird syntax |
| 16 | + include: |
| 17 | + - os: macos-latest |
| 18 | + build: eval $(opam env) && cd analysis && make test |
| 19 | + artifact-folder: darwin |
| 20 | + - os: ubuntu-latest |
| 21 | + build: eval $(opam env) && cd analysis && make test |
| 22 | + artifact-folder: linux |
| 23 | + - os: windows-latest |
| 24 | + # CI windows running the binary somehow stucks. Not sure why. Disable for now. |
| 25 | + build: "cd analysis && & $env:CYGWIN_ROOT\\bin\\ocaml-env exec -- make" |
| 26 | + artifact-folder: win32 |
15 | 27 |
|
16 | 28 | runs-on: ${{matrix.os}}
|
17 | 29 |
|
@@ -41,20 +53,19 @@ jobs:
|
41 | 53 | # - run: opam pin add rescript-editor-support.dev . --no-action
|
42 | 54 | # - run: opam install . --deps-only --with-doc --with-test
|
43 | 55 |
|
44 |
| - - run: eval $(opam env) && cd analysis && make test |
45 |
| - if: matrix.os != 'windows-latest' |
46 |
| - # CI windows running the binary somehow stucks. Not sure why. Disable for now. |
47 |
| - - run: "cd analysis && & $env:CYGWIN_ROOT\\bin\\ocaml-env exec -- make" |
48 |
| - if: matrix.os == 'windows-latest' |
| 56 | + - name: Build and test |
| 57 | + run: ${{matrix.build}} |
49 | 58 |
|
50 | 59 | # Also avoids artifacts upload permission loss:
|
51 | 60 | # https://github.com/actions/upload-artifact/tree/ee69f02b3dfdecd58bb31b4d133da38ba6fe3700#permission-loss
|
52 | 61 | - name: Compress files
|
53 |
| - run: > |
54 |
| - mv analysis/run.exe ${{matrix.os}}-run.exe && |
55 |
| - tar -cvf binary.tar ${{matrix.os}}-run.exe |
| 62 | + run: | |
| 63 | + cd analysis |
| 64 | + mkdir ${{matrix.artifact-folder}} |
| 65 | + mv run.exe ${{matrix.artifact-folder}}/rescript-editor-analysis.exe |
| 66 | + tar -cvf binary.tar ${{matrix.artifact-folder}}/rescript-editor-analysis.exe |
56 | 67 |
|
57 | 68 | - uses: actions/upload-artifact@v2
|
58 | 69 | with:
|
59 |
| - name: ${{matrix.os}}-run.exe |
| 70 | + name: ${{matrix.os}} |
60 | 71 | path: binary.tar
|
0 commit comments