Merge pull request #421 from qbicc/dependabot/github_actions/KyleMaye… #925
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: qbicc-class-libraries Continuous Integration | |
env: | |
CLASSLIB_VERSION: 17.0.0.0-SNAPSHOT | |
QBICC_VERSION: 0.77.0 | |
on: | |
push: | |
paths-ignore: | |
- '**.md' | |
- '**.adoc' | |
branches: [ 17.x ] | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
- '**.adoc' | |
branches: [ 17.x ] | |
types: [ opened, synchronize, reopened ] | |
jobs: | |
build-matrix: | |
name: "Matrix build" | |
strategy: | |
fail-fast: false | |
matrix: | |
llvm-version: ["15", "16"] | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
continue-on-error: true | |
steps: | |
- name: Install LLVM (Homebrew) | |
if: matrix.os == 'macos-latest' && matrix.llvm-version == '16' | |
run: | | |
brew install llvm@${{ matrix.llvm-version }} | |
echo /usr/local/opt/llvm@${{ matrix.llvm-version }}/bin >> $GITHUB_PATH | |
- name: Install LLVM (Non-homebrew) | |
if: matrix.os != 'macos-latest' || matrix.llvm-version != '16' | |
uses: KyleMayes/[email protected] | |
with: | |
version: ${{ matrix.llvm-version }} | |
directory: ${{ runner.temp }}/llvm-install | |
- name: Install `libgcc` (Linux only) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get install -y libgcc-11-dev | |
- name: Install libunwind (Linux only) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get install -y libunwind-dev | |
- name: Install OpenJDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Clone project | |
uses: actions/checkout@v4 | |
with: | |
path: qbicc-class-library | |
submodules: recursive | |
- name: Build class libraries | |
run: | | |
mvn --batch-mode install | |
working-directory: qbicc-class-library | |
- name: Clone qbicc | |
uses: actions/checkout@v4 | |
with: | |
repository: qbicc/qbicc | |
ref: ${{ env.QBICC_VERSION }} | |
path: qbicc-${{ matrix.os }}-llvm${{ matrix.llvm-version }} | |
- name: Run qbicc tests (Linux) | |
if: matrix.os == 'ubuntu-latest' | |
env: | |
LIBRARY_PATH: /usr/lib/gcc/x86_64-linux-gnu/11:/usr/lib/x86_64-linux-gnu | |
CC: clang | |
run: | | |
ulimit -c 819200 # 400mb | |
../qbicc-class-library/ci/prepare_for_core_linux.sh | |
mvn --batch-mode install -Dversion.qbicc.classlib=${{ env.CLASSLIB_VERSION }} -Dqbicc.llvm.opaque-pointers=true | |
working-directory: qbicc-${{ matrix.os }}-llvm${{ matrix.llvm-version }} | |
- name: Run qbicc tests (Mac OS) | |
if: matrix.os == 'macos-latest' | |
env: | |
LIBRARY_PATH: $(brew --prefix gcc)/lib/gcc/11 | |
CC: gcc | |
run: | | |
ulimit -c 819200 # 400mb | |
../qbicc-class-library/ci/prepare_for_core_macos.sh | |
mvn --batch-mode install -Dversion.qbicc.classlib=${{ env.CLASSLIB_VERSION }} -Dqbicc.llvm.opaque-pointers=true | |
working-directory: qbicc-${{ matrix.os }}-llvm${{ matrix.llvm-version }} | |
- name: Prepare failure archive (if maven failed) | |
if: failure() | |
shell: bash | |
run: find . -type d -name '*-reports' -o -name "*-logs" | tar -czf test-reports.tgz -T - | |
- name: Upload failure Archive (if maven failed) | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: test-reports | |
path: | | |
'test-reports.tgz' | |
./qbicc-*/core/* | |
./qbicc-*/integration-tests/target/native/qbicc-integration-tests |