Skip to content

Commit 08da0a6

Browse files
committed
add pre-commit config
1 parent d1a4585 commit 08da0a6

File tree

4 files changed

+87
-70
lines changed

4 files changed

+87
-70
lines changed

.github/workflows/release.yml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,43 @@ name: Release Builds
33
on: push
44

55
env:
6-
LLVM_VERSION: '12.0.1'
6+
LLVM_VERSION: "12.0.1"
77

88
jobs:
99
linux:
1010
name: Linux
1111
runs-on: ubuntu-18.04
1212
env:
13-
INSTALL_PREFIX: '/opt/smelibs'
14-
SUDO_CMD: 'sudo'
15-
TARGET_TRIPLE: 'x86_64-unknown-linux-gnu'
16-
PYTHON_EXE: '/usr/bin/python3'
17-
OS: 'linux'
13+
INSTALL_PREFIX: "/opt/smelibs"
14+
SUDO_CMD: "sudo"
15+
TARGET_TRIPLE: "x86_64-unknown-linux-gnu"
16+
PYTHON_EXE: "/usr/bin/python3"
17+
OS: "linux"
1818
defaults:
1919
run:
2020
shell: bash
2121
steps:
22-
- name: Set gcc version
23-
run: |
24-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100
25-
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 100
26-
- uses: actions/checkout@v2
27-
- name: Build script
28-
run: ./build.sh
29-
- uses: actions/upload-artifact@v2
30-
with:
31-
path: ./artefacts/*
22+
- name: Set gcc version
23+
run: |
24+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100
25+
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 100
26+
- uses: actions/checkout@v2
27+
- name: Build script
28+
run: ./build.sh
29+
- uses: actions/upload-artifact@v2
30+
with:
31+
path: ./artefacts/*
3232

3333
macos:
3434
name: MacOS
3535
runs-on: macos-10.15
3636
env:
37-
INSTALL_PREFIX: '/opt/smelibs'
38-
SUDO_CMD: 'sudo'
39-
TARGET_TRIPLE: 'x86_64-apple-darwin16'
40-
PYTHON_EXE: '/usr/bin/python3'
41-
MACOSX_DEPLOYMENT_TARGET: '10.14'
42-
OS: 'osx'
37+
INSTALL_PREFIX: "/opt/smelibs"
38+
SUDO_CMD: "sudo"
39+
TARGET_TRIPLE: "x86_64-apple-darwin16"
40+
PYTHON_EXE: "/usr/bin/python3"
41+
MACOSX_DEPLOYMENT_TARGET: "10.14"
42+
OS: "osx"
4343
defaults:
4444
run:
4545
shell: bash
@@ -55,11 +55,11 @@ jobs:
5555
name: Windows 64-bit Mingw
5656
runs-on: windows-2019
5757
env:
58-
INSTALL_PREFIX: '/c/smelibs'
59-
SUDO_CMD: ''
60-
TARGET_TRIPLE: 'x86_64-w64-windows-gnu'
61-
PYTHON_EXE: '/mingw64/bin/python'
62-
OS: 'win64-mingw'
58+
INSTALL_PREFIX: "/c/smelibs"
59+
SUDO_CMD: ""
60+
TARGET_TRIPLE: "x86_64-w64-windows-gnu"
61+
PYTHON_EXE: "/mingw64/bin/python"
62+
OS: "win64-mingw"
6363
defaults:
6464
run:
6565
shell: msys2 {0}
@@ -80,11 +80,11 @@ jobs:
8080
name: Windows 32-bit Mingw
8181
runs-on: windows-2019
8282
env:
83-
INSTALL_PREFIX: '/c/smelibs'
84-
SUDO_CMD: ''
85-
TARGET_TRIPLE: 'x86_64-w32-windows-gnu'
86-
PYTHON_EXE: '/mingw32/bin/python'
87-
OS: 'win32-mingw'
83+
INSTALL_PREFIX: "/c/smelibs"
84+
SUDO_CMD: ""
85+
TARGET_TRIPLE: "x86_64-w32-windows-gnu"
86+
PYTHON_EXE: "/mingw32/bin/python"
87+
OS: "win32-mingw"
8888
defaults:
8989
run:
9090
shell: msys2 {0}
@@ -106,8 +106,8 @@ jobs:
106106
runs-on: windows-2019
107107
env:
108108
INSTALL_PREFIX: 'C:\smelibs'
109-
TARGET_TRIPLE: 'x86_64-pc-windows-gnu'
110-
OS: 'win64-msvc'
109+
TARGET_TRIPLE: "x86_64-pc-windows-gnu"
110+
OS: "win64-msvc"
111111
steps:
112112
- uses: actions/checkout@v2
113113
- uses: ilammy/msvc-dev-cmd@v1
@@ -125,8 +125,8 @@ jobs:
125125
runs-on: windows-2019
126126
env:
127127
INSTALL_PREFIX: 'C:\smelibs'
128-
TARGET_TRIPLE: 'i686-pc-windows-gnu'
129-
OS: 'win32-msvc'
128+
TARGET_TRIPLE: "i686-pc-windows-gnu"
129+
OS: "win32-msvc"
130130
steps:
131131
- uses: actions/checkout@v2
132132
- uses: ilammy/msvc-dev-cmd@v1

.pre-commit-config.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.0.1
4+
hooks:
5+
- id: check-yaml
6+
- id: end-of-file-fixer
7+
- id: trailing-whitespace
8+
9+
- repo: https://github.com/pre-commit/mirrors-prettier
10+
rev: v2.4.1
11+
hooks:
12+
- id: prettier
13+
14+
- repo: https://github.com/lovesegfault/beautysh
15+
rev: v6.1.0
16+
hooks:
17+
- id: beautysh

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
Get the latest versions here:
66

7-
- linux (gcc 9 / Ubuntu 18.04): [sme_deps_llvm_linux.tgz](https://github.com/spatial-model-editor/sme_deps_llvm/releases/latest/download/sme_deps_llvm_linux.tgz)
8-
- osx (Apple clang 12 / macOS 10.15): [sme_deps_llvm_osx.tgz](https://github.com/spatial-model-editor/sme_deps_llvm/releases/latest/download/sme_deps_llvm_osx.tgz)
9-
- win32-mingw (mingw-w64-i686-gcc 10): [sme_deps_llvm_win32-mingw.tgz](https://github.com/spatial-model-editor/sme_deps_llvm/releases/latest/download/sme_deps_llvm_win32-mingw.tgz)
10-
- win64-mingw (mingw-w64-x86_64-gcc 10): [sme_deps_llvm_win64-mingw.tgz](https://github.com/spatial-model-editor/sme_deps_llvm/releases/latest/download/sme_deps_llvm_win64-mingw.tgz)
11-
- win32-msvc (VC++ 2015 Toolset): [sme_deps_llvm_win32-msvc.tgz](https://github.com/spatial-model-editor/sme_deps_llvm/releases/latest/download/sme_deps_llvm_win32-msvc.tgz)
12-
- win64-msvc (VC++ 2015 Toolset): [sme_deps_llvm_win64-msvc.tgz](https://github.com/spatial-model-editor/sme_deps_llvm/releases/latest/download/sme_deps_llvm_win64-msvc.tgz)
7+
- linux (gcc 9 / Ubuntu 18.04): [sme_deps_llvm_linux.tgz](https://github.com/spatial-model-editor/sme_deps_llvm/releases/latest/download/sme_deps_llvm_linux.tgz)
8+
- osx (Apple clang 12 / macOS 10.15): [sme_deps_llvm_osx.tgz](https://github.com/spatial-model-editor/sme_deps_llvm/releases/latest/download/sme_deps_llvm_osx.tgz)
9+
- win32-mingw (mingw-w64-i686-gcc 10): [sme_deps_llvm_win32-mingw.tgz](https://github.com/spatial-model-editor/sme_deps_llvm/releases/latest/download/sme_deps_llvm_win32-mingw.tgz)
10+
- win64-mingw (mingw-w64-x86_64-gcc 10): [sme_deps_llvm_win64-mingw.tgz](https://github.com/spatial-model-editor/sme_deps_llvm/releases/latest/download/sme_deps_llvm_win64-mingw.tgz)
11+
- win32-msvc (VC++ 2015 Toolset): [sme_deps_llvm_win32-msvc.tgz](https://github.com/spatial-model-editor/sme_deps_llvm/releases/latest/download/sme_deps_llvm_win32-msvc.tgz)
12+
- win64-msvc (VC++ 2015 Toolset): [sme_deps_llvm_win64-msvc.tgz](https://github.com/spatial-model-editor/sme_deps_llvm/releases/latest/download/sme_deps_llvm_win64-msvc.tgz)

build.sh

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -32,34 +32,34 @@ cd llvm
3232
mkdir build
3333
cd build
3434
cmake -G "Unix Makefiles" .. \
35-
-DPython3_EXECUTABLE=$PYTHON_EXE \
36-
-DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX \
37-
-DCMAKE_BUILD_TYPE=Release \
38-
-DLLVM_DEFAULT_TARGET_TRIPLE=$TARGET_TRIPLE \
39-
-DCMAKE_OSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET \
40-
-DLLVM_TARGETS_TO_BUILD="X86" \
41-
-DLLVM_BUILD_TOOLS=OFF \
42-
-DLLVM_INCLUDE_TOOLS=OFF \
43-
-DLLVM_BUILD_EXAMPLES=OFF \
44-
-DLLVM_INCLUDE_EXAMPLES=OFF \
45-
-DLLVM_BUILD_TESTS=OFF \
46-
-DLLVM_INCLUDE_TESTS=OFF \
47-
-DLLVM_INCLUDE_DOCS=OFF \
48-
-DLLVM_BUILD_UTILS=OFF \
49-
-DLLVM_INCLUDE_UTILS=OFF \
50-
-DLLVM_INCLUDE_GO_TESTS=OFF \
51-
-DLLVM_BUILD_BENCHMARKS=OFF \
52-
-DLLVM_INCLUDE_BENCHMARKS=OFF \
53-
-DLLVM_ENABLE_LIBPFM=OFF \
54-
-DLLVM_ENABLE_ZLIB=OFF \
55-
-DLLVM_ENABLE_DIA_SDK=OFF \
56-
-DLLVM_BUILD_INSTRUMENTED_COVERAGE=OFF \
57-
-DLLVM_ENABLE_BINDINGS=OFF \
58-
-DLLVM_ENABLE_RTTI=ON \
59-
-DLLVM_ENABLE_TERMINFO=OFF \
60-
-DLLVM_ENABLE_LIBXML2=OFF \
61-
-DLLVM_ENABLE_WARNINGS=OFF \
62-
-DLLVM_ENABLE_Z3_SOLVER=OFF
35+
-DPython3_EXECUTABLE=$PYTHON_EXE \
36+
-DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX \
37+
-DCMAKE_BUILD_TYPE=Release \
38+
-DLLVM_DEFAULT_TARGET_TRIPLE=$TARGET_TRIPLE \
39+
-DCMAKE_OSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET \
40+
-DLLVM_TARGETS_TO_BUILD="X86" \
41+
-DLLVM_BUILD_TOOLS=OFF \
42+
-DLLVM_INCLUDE_TOOLS=OFF \
43+
-DLLVM_BUILD_EXAMPLES=OFF \
44+
-DLLVM_INCLUDE_EXAMPLES=OFF \
45+
-DLLVM_BUILD_TESTS=OFF \
46+
-DLLVM_INCLUDE_TESTS=OFF \
47+
-DLLVM_INCLUDE_DOCS=OFF \
48+
-DLLVM_BUILD_UTILS=OFF \
49+
-DLLVM_INCLUDE_UTILS=OFF \
50+
-DLLVM_INCLUDE_GO_TESTS=OFF \
51+
-DLLVM_BUILD_BENCHMARKS=OFF \
52+
-DLLVM_INCLUDE_BENCHMARKS=OFF \
53+
-DLLVM_ENABLE_LIBPFM=OFF \
54+
-DLLVM_ENABLE_ZLIB=OFF \
55+
-DLLVM_ENABLE_DIA_SDK=OFF \
56+
-DLLVM_BUILD_INSTRUMENTED_COVERAGE=OFF \
57+
-DLLVM_ENABLE_BINDINGS=OFF \
58+
-DLLVM_ENABLE_RTTI=ON \
59+
-DLLVM_ENABLE_TERMINFO=OFF \
60+
-DLLVM_ENABLE_LIBXML2=OFF \
61+
-DLLVM_ENABLE_WARNINGS=OFF \
62+
-DLLVM_ENABLE_Z3_SOLVER=OFF
6363
ls
6464
time make -j2
6565
$SUDO_CMD make install

0 commit comments

Comments
 (0)