Skip to content

on-sdk-update

on-sdk-update #1169

Workflow file for this run

name: Test
on:
push:
branches: [ main ]
workflow_dispatch:
repository_dispatch:
types: [on-sdk-update]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, ubuntu-latest]
opt: [O0, O3, Os, Oz]
fail-fast: false
steps:
- name: Install Ubuntu build dependencies.
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get -y install ninja-build llvm
python3 -m pip install --user --use-pep517 lit
- name: Install MacOS tools
if: startsWith(matrix.os, 'macos')
run: |
brew update
brew install ninja
python3 -m pip install --user --use-pep517 --break-system-packages lit
- name: Check out the test suite.
uses: actions/checkout@v2
- name: Fetch the latest Ubuntu llvm-mos release.
if: startsWith(matrix.os, 'ubuntu')
run: |
curl -LO https://github.com/llvm-mos/llvm-mos-sdk/releases/download/prerelease/llvm-mos-linux.tar.xz
tar -xvf llvm-mos-linux.tar.xz
- name: Fetch the latest Mac llvm-mos release.
if: startsWith(matrix.os, 'macos')
run: |
curl -LO https://github.com/llvm-mos/llvm-mos-sdk/releases/download/prerelease/llvm-mos-macos.tar.xz
tar -xvf llvm-mos-macos.tar.xz
- name: Build the test suite.
run: |
mkdir build
cd build
cmake -DLLVM_MOS=$GITHUB_WORKSPACE/llvm-mos \
-C../cmake/caches/${{ matrix.opt }}.cmake \
-C../cmake/caches/target-mos.cmake \
-G Ninja \
..
ninja
- name: Run the test suite.
run: |
cd build
$(python3 -m site --user-base)/bin/lit .