Skip to content

Commit 0e1df0d

Browse files
committed
test setup-ci
1 parent 6a0a2ae commit 0e1df0d

File tree

3 files changed

+20
-78
lines changed

3 files changed

+20
-78
lines changed

Diff for: .github/workflows/release.yml

+17-77
Original file line numberDiff line numberDiff line change
@@ -6,95 +6,35 @@ env:
66
LLVM_VERSION: "18.1.0"
77

88
jobs:
9-
linux:
10-
name: Linux
11-
runs-on: ubuntu-20.04
12-
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"
18-
CC: "clang"
19-
CXX: "clang++"
9+
build:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
include:
15+
- os: "ubuntu-20.04"
16+
shell: "bash"
17+
- os: "macos-13"
18+
shell: "bash"
19+
- os: "windows-2022"
20+
shell: "msys2 {0}"
2021
defaults:
2122
run:
22-
shell: bash
23+
shell: ${{ matrix.shell }}
2324
steps:
24-
- name: Add llvm repo for clang 18 & install
25-
run: |
26-
sudo wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
27-
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-18 main"
28-
sudo apt update -yy
29-
sudo apt install -yy clang-18
30-
- name: Set clang version
31-
run: |
32-
sudo update-alternatives --remove-all clang || echo "nothing to remove"
33-
sudo update-alternatives --remove-all clang++ || echo "nothing to remove"
34-
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 100
35-
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-18 100
25+
- uses: spatial-model-editor/setup-ci@v1
3626
- uses: actions/checkout@v4
3727
- name: Build script
3828
run: ./build.sh
3929
- uses: actions/upload-artifact@v4
4030
with:
41-
name: artifacts-linux
42-
path: ./artefacts/*
43-
44-
macos:
45-
name: MacOS
46-
runs-on: macos-13
47-
env:
48-
INSTALL_PREFIX: "/opt/smelibs"
49-
SUDO_CMD: "sudo"
50-
TARGET_TRIPLE: "x86_64-apple-darwin16"
51-
PYTHON_EXE: "/usr/bin/python3"
52-
MACOSX_DEPLOYMENT_TARGET: "11"
53-
OS: "osx"
54-
defaults:
55-
run:
56-
shell: bash
57-
steps:
58-
- uses: actions/checkout@v4
59-
- uses: maxim-lobanov/setup-xcode@v1
60-
with:
61-
xcode-version: "14.3"
62-
- name: Build script
63-
run: ./build.sh
64-
- uses: actions/upload-artifact@v4
65-
with:
66-
name: artifacts-macos
67-
path: ./artefacts/*
68-
69-
win64-mingw:
70-
name: Windows 64-bit Mingw
71-
runs-on: windows-2022
72-
env:
73-
INSTALL_PREFIX: "/c/smelibs"
74-
SUDO_CMD: ""
75-
TARGET_TRIPLE: "x86_64-w64-windows-gnu"
76-
PYTHON_EXE: "/ucrt64/bin/python"
77-
OS: "win64-mingw"
78-
defaults:
79-
run:
80-
shell: msys2 {0}
81-
steps:
82-
- uses: actions/checkout@v4
83-
- uses: msys2/setup-msys2@v2
84-
with:
85-
msystem: UCRT64
86-
update: true
87-
install: mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-python make
88-
- name: Build script
89-
run: ./build.sh
90-
- uses: actions/upload-artifact@v4
91-
with:
92-
name: artifacts-win64-mingw
31+
name: artifacts-${{ matrix.os }}
9332
path: ./artefacts/*
33+
retention-days: 3
9434

9535
release:
9636
name: Upload Binaries to GitHub Release
97-
needs: [linux, macos, win64-mingw]
37+
needs: [build]
9838
runs-on: ubuntu-latest
9939
permissions:
10040
contents: write

Diff for: .pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.5.0
3+
rev: v4.6.0
44
hooks:
55
- id: check-yaml
66
- id: end-of-file-fixer

Diff for: build.sh

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ cmake --version
1919
which python
2020
python --version
2121

22+
exit
23+
2224
NPROCS=4
2325
if [[ "$OS_TARGET" == "osx" ]]; then
2426
NPROCS=3

0 commit comments

Comments
 (0)