Skip to content

Commit 7bfa080

Browse files
committed
Only use github workflow
1 parent 7460ba8 commit 7bfa080

File tree

5 files changed

+45
-282
lines changed

5 files changed

+45
-282
lines changed

.github/workflows/build.yml

Lines changed: 45 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -5,110 +5,68 @@ on:
55
tags:
66
- 'v*'
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
812
jobs:
9-
build-x64-linux:
13+
build-linux:
1014
timeout-minutes: 360
11-
env:
12-
VCPKG_DEP_LIST: x64-linux
13-
VCPKG_FEATURE_FLAGS: -binarycaching
14-
runs-on: [self-hosted, linux, X64, dep-builder]
15+
container:
16+
image: nebulastream/nes-development-base:latest
1517
strategy:
1618
fail-fast: false
1719
matrix:
18-
osversion: [ubuntu-22.04]
20+
arch: [x64, arm64]
1921
stdlib: [libc++, stdlibc++]
2022
sanitizer: [null, 'Address', 'Thread', 'Undefined']
23+
runs-on: [self-hosted, linux, "${{ matrix.arch }}", dep-builder]
2124
steps:
2225
- uses: AutoModality/action-clean@v1
23-
- uses: actions/checkout@v2
26+
- uses: actions/checkout@v4
2427
with:
2528
submodules: 'recursive'
26-
- name: Set output vars to the actual tag name
27-
id: vars
28-
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
29-
- name: Build Docker
30-
id: builddocker
31-
working-directory: ${{ github.workspace }}/docker/
32-
run: docker build -t nes_clang_build_${{ matrix.osversion }} -f Dockerfile-${{ matrix.osversion }} .
3329
- name: Build Clang
30+
shell: bash
3431
id: installdeps
3532
run: |
36-
echo "${{ matrix.stdlib }}"
37-
docker run -v ${{ github.workspace }}:/build_dir -e ENABLE_SANITIZER=${{ matrix.sanitizer || '' }} -e STDLIB=${{ matrix.stdlib }} --rm nes_clang_build_${{ matrix.osversion }} \
38-
./build_dir/build_ubuntu-x64.sh
39-
- name: Compress artifacts
40-
id: compressdeps
41-
run: |
42-
7z a nes-clang-18-${{ matrix.osversion }}-${{ matrix.stdlib }}-X64-${{ matrix.sanitizer || 'None' }}.7z clang -mx9 -aoa
43-
- name: Release
44-
uses: softprops/action-gh-release@v1
45-
id: createrelease
46-
with:
47-
files: |
48-
nes-clang-18-${{ matrix.osversion }}-${{ matrix.stdlib }}-X64-${{ matrix.sanitizer || 'None' }}.7z
49-
- name: Clean build artifacts
50-
id: cleanbuildartifacts
51-
if: always()
52-
run: |
53-
rm -rf llvm-project
54-
rm -rf .git
55-
rm -rf clang
56-
- name: Remove docker image
57-
id: removedockerimage
58-
if: always()
59-
run: |
60-
test -n "$(docker image ls -q nes_clang_build_${{ matrix.osversion }})" && \
61-
docker image rm $(docker image ls -q nes_clang_build_${{ matrix.osversion }}) || \
62-
true
63-
build-arm-linux:
64-
env:
65-
VCPKG_DEP_LIST: arm64-linux
66-
VCPKG_FEATURE_FLAGS: -binarycaching
67-
runs-on: [self-hosted, linux, ARM64, dep-builder]
68-
strategy:
69-
matrix:
70-
osversion: [ubuntu-22.04]
71-
stdlib: [libc++, stdlibc++]
72-
sanitizer: [null, 'Address', 'Thread', 'Undefined']
73-
steps:
74-
- uses: AutoModality/action-clean@v1
75-
- uses: actions/checkout@v2
76-
with:
77-
submodules: 'recursive'
78-
- name: Set output vars to the actual tag name
79-
id: vars
80-
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
81-
- name: Build Docker
82-
id: builddocker
83-
working-directory: ${{ github.workspace }}/docker/
84-
run: docker build -t nes_clang_build_${{ matrix.osversion }} -f Dockerfile-${{ matrix.osversion }} .
85-
- name: Build Clang
86-
id: installdeps
87-
run: |
88-
docker run -v ${{ github.workspace }}:/build_dir -e ENABLE_SANITIZER=${{ matrix.sanitizer || '' }} -e STDLIB=${{ matrix.stdlib }} --rm nes_clang_build_${{ matrix.osversion }} \
89-
./build_dir/build_ubuntu-arm64.sh
90-
- name: Compress artifacts
91-
id: compressdeps
92-
run: |
93-
7z a nes-clang-18-${{ matrix.osversion }}-${{ matrix.stdlib }}-arm64-${{ matrix.sanitizer || 'None' }}.7z clang -mx9 -aoa
33+
if [[ "${{ matrix.stdlib }}" == "libc++" ]]; then
34+
CXX_FLAGS="-stdlib=libc++ -std=c++20"
35+
LINKER_FLAGS="-lc++"
36+
elif [[ "${{ matrix.stdlib }}" == "stdlibc++" ]]; then
37+
CXX_FLAGS="-std=c++20"
38+
LINKER_FLAGS=""
39+
fi
40+
41+
if [[ ! -z "${{ matrix.sanitizer || '' }}" ]]; then
42+
ADDITIONAL_FLAGS="${ADDITIONAL_FLAGS} -DLLVM_USE_SANITIZER=${ENABLE_SANITIZER}"
43+
fi
44+
45+
export CXXFLAGS=${CXX_FLAGS}
46+
export LDFLAGS="${LINKER_FLAGS} -fuse-ld=mold"
47+
48+
cmake -G Ninja -S llvm-project/llvm -B build -DCMAKE_BUILD_TYPE=Release \
49+
-DLLVM_ENABLE_PROJECTS="mlir" \
50+
-DBOOTSTRAP_LLVM_ENABLE_LTO=ON \
51+
-DLLVM_INCLUDE_EXAMPLES=OFF \
52+
-DLLVM_INCLUDE_TESTS=OFF \
53+
-DLLVM_INCLUDE_BENCHMARKS=OFF \
54+
-DLLVM_BUILD_EXAMPLES=OFF \
55+
-DLIBCXX_INCLUDE_BENCHMARKS=OFF \
56+
-DLLVM_OPTIMIZED_TABLEGEN=ON \
57+
-DCMAKE_INSTALL_PREFIX="/build_dir/clang" \
58+
-DLLVM_TARGETS_TO_BUILD="X86, AArch64" \
59+
-DLLVM_BUILD_TOOLS=ON \
60+
-DLLVM_ENABLE_TERMINFO=OFF \
61+
-DLLVM_ENABLE_Z3_SOLVER=OFF \
62+
${ADDITIONAL_FLAGS}
63+
64+
cmake --build build --target install -j$(nproc)
65+
7z a nes-clang-18-${{ matrix.stdlib }}-X64-${{ matrix.sanitizer || 'None' }}.7z /build_dir/clang -mx9 -aoa
9466
- name: Release
9567
uses: softprops/action-gh-release@v1
9668
id: createrelease
9769
with:
9870
files: |
99-
nes-clang-18-${{ matrix.osversion }}-${{ matrix.stdlib }}-arm64-${{ matrix.sanitizer || 'None' }}.7z
100-
- name: Clean build artifacts
101-
id: cleanbuildartifacts
102-
if: always()
103-
run: |
104-
rm -rf clang
105-
rm -rf llvm-project
106-
rm -rf .git
107-
- name: Remove docker image
108-
id: removedockerimage
109-
if: always()
110-
run: |
111-
test -n "$(docker image ls -q nes_clang_build_${{ matrix.osversion }})" && \
112-
docker image rm $(docker image ls -q nes_clang_build_${{ matrix.osversion }}) || \
113-
true
71+
nes-clang-18-${{ matrix.stdlib }}-X64-${{ matrix.sanitizer || 'None' }}.7z
11472

build_ubuntu-arm64.sh

Lines changed: 0 additions & 63 deletions
This file was deleted.

build_ubuntu-x64.sh

Lines changed: 0 additions & 66 deletions
This file was deleted.

docker/Dockerfile-ubuntu-22.04

Lines changed: 0 additions & 41 deletions
This file was deleted.

docker/entrypoint-build.sh

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)