aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
blob: f9acbae9810cfe8a3fde3c9cfec1d981bcad65ad (plain)
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
82
83
84
85
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run. 
on:
  # Triggers the workflow on push or pull request events but only for the master branch
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

jobs:
  build_windows:
    runs-on: windows-2019
    timeout-minutes: 15
    steps:
    - uses: actions/checkout@v1
    - name: Download Odin
      shell: cmd
      run: |
        git clone  -b map-dev https://github.com/odin-lang/Odin
    - name: Download and unpack LLVM bins
      shell: powershell
      run: |
          cd Odin
          cd bin
          $ProgressPreference = "SilentlyContinue";
          Invoke-WebRequest -Uri https://github.com/odin-lang/Odin/releases/download/llvm-windows/llvm-binaries.zip -OutFile llvm-binaries.zip
          7z x llvm-binaries.zip > $null 
    - name: Build Odin
      shell: cmd
      run: |
        call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
        cd Odin
        ./build.bat 1
    - name: Build ols
      shell: cmd
      run: |
        ./build.bat CI
  build_linux:
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
    - uses: actions/checkout@v1
    - name: Download LLVM
      run: sudo apt-get install llvm-11 clang-11
    - name: Download Odin
      run: |
        git clone  -b map-dev https://github.com/odin-lang/Odin
    - name: Build Odin
      run: |
        cd Odin
        ./build_odin.sh release
    - name: Build ols
      run: |
        dir
        ./build.sh CI
  build_macOS:
    runs-on: macos-latest
    timeout-minutes: 15
    steps:
    - uses: actions/checkout@v1
    - name: Download LLVM and setup PATH
      run: |
        brew install llvm@11
        echo "/usr/local/opt/llvm@11/bin" >> $GITHUB_PATH
        TMP_PATH=$(xcrun --show-sdk-path)/user/include
        echo "CPATH=$TMP_PATH" >> $GITHUB_ENV
    - name: Download Odin
      run: | 
        git clone -b map-dev https://github.com/odin-lang/Odin
    - name: Build Odin
      run: |
        cd Odin
        make release
    - name: Build ols
      run: ./build.sh CI