NES Clang builder #87
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: NES Clang builder | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build-x64-linux: | |
timeout-minutes: 360 | |
env: | |
VCPKG_DEP_LIST: x64-linux | |
VCPKG_FEATURE_FLAGS: -binarycaching | |
runs-on: [self-hosted, linux, X64, dep-builder] | |
strategy: | |
fail-fast: false | |
matrix: | |
osversion: [ubuntu-22.04] | |
stdlib: [libc++, stdlibc++] | |
sanitizer: [null, 'Address', 'Thread', 'Undefined'] | |
steps: | |
- uses: AutoModality/action-clean@v1 | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Set output vars to the actual tag name | |
id: vars | |
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | |
- name: Build Docker | |
id: builddocker | |
working-directory: ${{ github.workspace }}/docker/ | |
run: docker build -t nes_clang_build_${{ matrix.osversion }} -f Dockerfile-${{ matrix.osversion }} . | |
- name: Build Clang | |
id: installdeps | |
run: | | |
echo "${{ matrix.stdlib }}" | |
docker run -v ${{ github.workspace }}:/build_dir -e ENABLE_SANITIZER=${{ matrix.sanitizer || '' }} -e STDLIB=${{ matrix.stdlib }} --rm nes_clang_build_${{ matrix.osversion }} \ | |
./build_dir/build_ubuntu-x64.sh | |
- name: Compress artifacts | |
id: compressdeps | |
run: | | |
7z a nes-clang-18-${{ matrix.osversion }}-${{ matrix.stdlib }}-X64-${{ matrix.sanitizer || 'None' }}.7z clang -mx9 -aoa | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
id: createrelease | |
with: | |
files: | | |
nes-clang-18-${{ matrix.osversion }}-${{ matrix.stdlib }}-X64-${{ matrix.sanitizer || 'None' }}.7z | |
- name: Clean build artifacts | |
id: cleanbuildartifacts | |
if: always() | |
run: | | |
rm -rf llvm-project | |
rm -rf .git | |
rm -rf clang | |
- name: Remove docker image | |
id: removedockerimage | |
if: always() | |
run: | | |
test -n "$(docker image ls -q nes_clang_build_${{ matrix.osversion }})" && \ | |
docker image rm $(docker image ls -q nes_clang_build_${{ matrix.osversion }}) || \ | |
true | |
build-arm-linux: | |
env: | |
VCPKG_DEP_LIST: arm64-linux | |
VCPKG_FEATURE_FLAGS: -binarycaching | |
runs-on: [self-hosted, linux, ARM64, dep-builder] | |
strategy: | |
matrix: | |
osversion: [ubuntu-22.04] | |
stdlib: [libc++, stdlibc++] | |
sanitizer: [null, 'Address', 'Thread', 'Undefined'] | |
steps: | |
- uses: AutoModality/action-clean@v1 | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Set output vars to the actual tag name | |
id: vars | |
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | |
- name: Build Docker | |
id: builddocker | |
working-directory: ${{ github.workspace }}/docker/ | |
run: docker build -t nes_clang_build_${{ matrix.osversion }} -f Dockerfile-${{ matrix.osversion }} . | |
- name: Build Clang | |
id: installdeps | |
run: | | |
docker run -v ${{ github.workspace }}:/build_dir -e ENABLE_SANITIZER=${{ matrix.sanitizer || '' }} -e STDLIB=${{ matrix.stdlib }} --rm nes_clang_build_${{ matrix.osversion }} \ | |
./build_dir/build_ubuntu-arm64.sh | |
- name: Compress artifacts | |
id: compressdeps | |
run: | | |
7z a nes-clang-18-${{ matrix.osversion }}-${{ matrix.stdlib }}-arm64-${{ matrix.sanitizer || 'None' }}.7z clang -mx9 -aoa | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
id: createrelease | |
with: | |
files: | | |
nes-clang-18-${{ matrix.osversion }}-${{ matrix.stdlib }}-arm64-${{ matrix.sanitizer || 'None' }}.7z | |
- name: Clean build artifacts | |
id: cleanbuildartifacts | |
if: always() | |
run: | | |
rm -rf clang | |
rm -rf llvm-project | |
rm -rf .git | |
- name: Remove docker image | |
id: removedockerimage | |
if: always() | |
run: | | |
test -n "$(docker image ls -q nes_clang_build_${{ matrix.osversion }})" && \ | |
docker image rm $(docker image ls -q nes_clang_build_${{ matrix.osversion }}) || \ | |
true | |