Skip to content

Commit 823b015

Browse files
committed
Renovate and extend CI workflow
1 parent 7e62cff commit 823b015

File tree

1 file changed

+64
-66
lines changed

1 file changed

+64
-66
lines changed

.github/workflows/ci.yml

+64-66
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,80 @@
1-
# This is a basic workflow to help you get started with Actions
2-
31
name: CI
42

5-
# Controls when the action will run.
63
on:
7-
# Triggers the workflow on push or pull request events but only for the master branch
84
push:
9-
branches: [ master ]
5+
branches: ['master']
6+
paths-ignore: ['**/*.md']
107
pull_request:
11-
branches: [ master ]
12-
13-
# Allows you to run this workflow manually from the Actions tab
8+
branches: ['master']
9+
paths-ignore: ['**/*.md']
10+
# Allow to run this workflow manually from the Actions tab.
1411
workflow_dispatch:
1512

1613
jobs:
17-
build_windows:
18-
runs-on: windows-2019
14+
windows:
15+
strategy:
16+
matrix:
17+
os: [windows-2019, windows-latest]
18+
fail-fast: false
19+
runs-on: ${{ matrix.os }}
1920
timeout-minutes: 15
2021
steps:
21-
- uses: actions/checkout@v1
22-
- name: Download Odin
23-
shell: cmd
24-
run: git clone https://github.com/odin-lang/Odin
25-
- name: Download and unpack LLVM bins
26-
shell: powershell
27-
run: |
28-
cd Odin
29-
cd bin
22+
- uses: actions/checkout@v4
23+
- name: Setup Dependencies
24+
run: |
25+
git clone --depth 1 https://github.com/odin-lang/Odin
26+
cd Odin/bin
3027
$ProgressPreference = "SilentlyContinue";
3128
Invoke-WebRequest -Uri https://github.com/odin-lang/Odin/releases/download/llvm-windows/llvm-binaries.zip -OutFile llvm-binaries.zip
32-
7z x llvm-binaries.zip > $null
33-
- name: Build Odin
34-
shell: cmd
35-
run: |
36-
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
37-
cd Odin
38-
./build.bat 1
39-
- name: Build ols
40-
shell: cmd
41-
run: |
42-
./build.bat CI
43-
build_linux:
44-
runs-on: ubuntu-latest
29+
7z x llvm-binaries.zip > $null
30+
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
31+
- name: Build Odin
32+
run: |
33+
cd Odin
34+
./build.bat 1
35+
- name: Build ols
36+
run: ./build.bat CI
37+
38+
linux:
39+
strategy:
40+
matrix:
41+
os: [ubuntu-20.04, ubuntu-latest]
42+
fail-fast: false
43+
runs-on: ${{ matrix.os }}
4544
timeout-minutes: 15
4645
steps:
47-
- uses: actions/checkout@v1
48-
- name: Download LLVM
49-
run: sudo apt-get install llvm-11 clang-11
50-
- name: Download Odin
51-
run: git clone https://github.com/odin-lang/Odin
52-
- name: Build Odin
53-
run: |
54-
cd Odin
55-
./build_odin.sh release
56-
- name: Build ols
57-
run: |
58-
dir
59-
./build.sh CI
60-
build_macOS:
61-
runs-on: macos-latest
46+
- uses: actions/checkout@v4
47+
- name: Setup Dependencies
48+
if: matrix.os == 'ubuntu-20.04'
49+
# LLVM 12 and 11 are pre-installed on GitHub runners. On ubuntu-20.04, LLVM 12
50+
# is available as version 12.0.0 whilst Odin requires 12.0.1. It would try to use
51+
# LLVM 12 by default and CI would fail. Therefore we'll remove it to use LLVM 11.
52+
run: sudo apt update && sudo apt purge -qq -y llvm-12 clang-12
53+
- name: Buid Odin
54+
run: |
55+
git clone --depth 1 https://github.com/odin-lang/Odin
56+
cd Odin && ./build_odin.sh release
57+
- name: Build ols
58+
run: ./build.sh CI
59+
60+
macos:
61+
strategy:
62+
matrix:
63+
os: [macos-11, macos-latest]
64+
fail-fast: false
65+
runs-on: ${{ matrix.os }}
6266
timeout-minutes: 15
6367
steps:
64-
- uses: actions/checkout@v1
65-
- name: Download LLVM and setup PATH
66-
run: |
67-
brew install llvm@14
68-
echo "/usr/local/opt/llvm@14/bin" >> $GITHUB_PATH
69-
TMP_PATH=$(xcrun --show-sdk-path)/user/include
70-
echo "CPATH=$TMP_PATH" >> $GITHUB_ENV
71-
- name: Download Odin
72-
run: git clone https://github.com/odin-lang/Odin
73-
- name: Build Odin
74-
run: |
75-
cd Odin
76-
make release
77-
- name: Build ols
78-
run: ./build.sh CI
79-
80-
81-
82-
68+
- uses: actions/checkout@v4
69+
- name: Setup Dependencies
70+
run: |
71+
brew install llvm@14
72+
echo "/usr/local/opt/llvm@14/bin" >> $GITHUB_PATH
73+
TMP_PATH=$(xcrun --show-sdk-path)/user/include
74+
echo "CPATH=$TMP_PATH" >> $GITHUB_ENV
75+
- name: Build Odin
76+
run: |
77+
git clone --depth 1 https://github.com/odin-lang/Odin
78+
cd Odin && ./build_odin.sh release
79+
- name: Build ols
80+
run: ./build.sh CI

0 commit comments

Comments
 (0)