Skip to content

Start working on Julia 1.10 support #300

Start working on Julia 1.10 support

Start working on Julia 1.10 support #300

Workflow file for this run

name: Brutus CI
on:
pull_request:
push:
branches:
- master
- release-*
tags: '*'
jobs:
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04]
julia-repository: [JuliaLang/julia]
julia-commit: [f3e3554910a79fa38d5662d14abe04e137075e18] # Julia 1.8-dev
llvm-commit: [4743f8ded72e15f916fa1d4cc198bdfd7bfb2193] # LLVM 13.0.1-0
env:
CCACHE_DIR: ${GITHUB_WORKSPACE}/.ccache
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 6
CCACHE_MAXSIZE: 400M
steps:
# must checkout Brutus first, lest everything in ${GITHUB_WORKSPACE} be
# deleted when we finally do check it out
- name: Checkout Brutus
uses: actions/checkout@master
- name: Cache Julia
id: cache-julia
uses: pat-s/always-upload-cache@v2
with:
path: julia/usr
key: ${{ matrix.os }}-julia-${{ matrix.julia-commit }}-${{ matrix.llvm-commit }}
# needed because they're just symlinks in usr/share
# long term, we will probably want to cache an installed Julia
- name: Cache stdlibs
uses: pat-s/always-upload-cache@v2
with:
path: julia/stdlib
key: ${{ matrix.os }}-stdlibs-${{ matrix.julia-commit }}-${{ matrix.llvm-commit }}
- name: Install build dependencies for Julia
if: steps.cache-julia.outputs.cache-hit != 'true'
run: sudo apt-get update && sudo apt-get install gfortran
- name: Checkout Julia
uses: actions/checkout@v2
if: steps.cache-julia.outputs.cache-hit != 'true'
with:
repository: ${{ matrix.julia-repository }}
ref: ${{ matrix.julia-commit }}
path: julia
- name: Build Julia
if: steps.cache-julia.outputs.cache-hit != 'true'
run: |
cd julia
make -j `nproc` \
USE_BINARYBUILDER_LLVM=0 \
DEPS_GIT=1 \
LLVM_DEBUG=0 \
USE_MLIR=1 \
LLVM_SHA1=${{ matrix.llvm-commit }} \
JULIA_CPU_TARGET="generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)"
- name: Check Julia version
run: ${GITHUB_WORKSPACE}/julia/usr/bin/julia -e "using InteractiveUtils; versioninfo()"
- name: Install build tools
run: sudo apt-get update && sudo apt-get install ccache
- name: Prepare timestamp for ccache cache
id: ccache-cache-timestamp
run: echo "::set-output name=timestamp::`date -u +%Y%m%d-%H%M%S`"
- name: Cache ccache files
uses: pat-s/always-upload-cache@v2
with:
path: .ccache
key: ${{ matrix.os }}-ccache-${{ steps.ccache-cache-timestamp.outputs.timestamp }}
restore-keys: ${{ matrix.os }}-ccache-
- name: Configure build
run: |
cmake -S . -B build \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DMLIR_DIR="${GITHUB_WORKSPACE}/julia/usr/lib/cmake/mlir" \
-DLLVM_EXTERNAL_LIT="${GITHUB_WORKSPACE}/julia/usr/tools/lit/lit.py" \
-DJulia_EXECUTABLE="${GITHUB_WORKSPACE}/julia/usr/bin/julia" \
-DCMAKE_BUILD_TYPE=Release
- name: Build library
run: cmake --build build --target brutus --parallel `nproc`
- name: Precompile library
run: |
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/build/lib
${GITHUB_WORKSPACE}/julia/usr/bin/julia --project=Brutus -e 'using Pkg; pkg"instantiate"; pkg"precompile"'
- name: Test Brutus
run: |
cmake --build build --target check-brutus --parallel `nproc`
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/build/lib
${GITHUB_WORKSPACE}/julia/usr/bin/julia --project=Brutus -e 'using Pkg; pkg"test"'