Skip to content

Patmos CI

Patmos CI #77

Workflow file for this run

name: Patmos CI
on:
push:
branches: '**'
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-**'
pull_request:
schedule:
# Run every monday at 1:00 AM
- cron: '00 1 * * MON'
env:
CARGO_TERM_COLOR: always
J: -j2
BUILD_PATH: build
INSTALL_PATH: build/local
LLVM_PATH: llvm
CLANG_PATH: clang
COMPILER_RT_PATH: compiler-rt
COMPILER_RT_BUILD_PATH: build-compiler-rt
NEWLIB_PATH: patmos-newlib
NEWLIB_BUILD_PATH: build-newlib
BENCH_PATH: patmos-benchmarks
BENCH_BUILD_PATH: build-bench
CET_TESTS_PATH: patmos-cet-test-suite
LLD_PATH: lld
jobs:
test-non-patmos:
name: Test Non-Patmos
runs-on: ubuntu-latest
strategy:
fail-fast: false
env:
CC: gcc
CXX: g++
steps:
- uses: actions/checkout@v2
- name: Build and Run LLVM Unit and Regression Tests
uses: ./.github/actions/build-test-all
with:
targets: X86
enable-assertions: true
# Exclude known failing tests
exclude-reg: "(Clang :: Lexer/case-insensitive-include.c)|(Clang :: Lexer/case-insensitive-system-include.c)|(Clang :: Modules/inferred-framework-case.m)|(Clang :: Preprocessor/nonportable-include-with-hmap.c)"
include-only: "."
default-target: x86_64-unknown-linux-gnu
compiler-rt-tests: 'X86_64LinuxConfig'
enable-package: false
- name: Finalize LLVM Build
working-directory: ${{env.BUILD_PATH}}
run: make $J llc llvm-link clang llvm-config llvm-objdump opt
package-patmos:
name: Build, Test, and Package (${{matrix.platform}})
runs-on: ${{matrix.platform}}
strategy:
fail-fast: false
matrix:
include:
- platform: ubuntu-latest
cc: gcc
cxx: g++
- platform: ubuntu-22.04
cc: gcc
cxx: g++
- platform: ubuntu-20.04
cc: gcc
cxx: g++
- platform: macos-latest
cc: clang
cxx: clang++
- platform: macos-12
cc: clang
cxx: clang++
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/install-dependencies
- name: Build and Run LLVM Unit and Regression Tests
uses: ./.github/actions/build-test-all
with:
enable-assertions: true
artifact-name: package-${{matrix.platform}}
test-benchmarks:
name: Test Benchmarks (${{matrix.platform}})
runs-on: ${{matrix.platform}}
strategy:
fail-fast: false
matrix:
include:
- platform: ubuntu-latest
cc: gcc
cxx: g++
- platform: ubuntu-22.04
cc: gcc
cxx: g++
- platform: ubuntu-20.04
cc: gcc
cxx: g++
- platform: macos-latest
cc: clang
cxx: clang++
- platform: macos-12
cc: clang
cxx: clang++
needs: [package-patmos]
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/install-dependencies
- name: Build and Run LLVM Unit and Regression Tests
uses: ./.github/actions/test-benchmarks
with:
artifact-name: package-${{matrix.platform}}
release:
name: Release (${{matrix.platform}})
runs-on: ${{matrix.platform}}
permissions:
contents: write
strategy:
fail-fast: true
matrix:
include:
- platform: ubuntu-20.04
cc: gcc
cxx: g++
- platform: macos-12
cc: clang
cxx: clang++
# Run after the test jobs finish
needs: [package-patmos, test-benchmarks, test-non-patmos]
# Run only if this was triggered by a tag
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
env:
RELEASE_TAR: patmos-llvm*.tar.gz
PATMOS_TRIPLE: patmos-unknown-unknown-elf
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
steps:
- uses: actions/checkout@v2
- name: Build LLVM, Compiler-RT, Newlib, and Package
uses: ./.github/actions/build-test-all
with:
# Compiler currently doesn't work without assertions enabled
enable-assertions: true
enable-tests: false
artifact-name: package-${{matrix.platform}}
- name: Publish
uses: softprops/action-gh-release@v1
with:
files: ${{env.BUILD_PATH}}/patmos-unknown-unknown-elf/package-temp/patmos-llvm-*.tar.gz