Skip to content

Fix CI (for Linux and MacOS) #23

Fix CI (for Linux and MacOS)

Fix CI (for Linux and MacOS) #23

Workflow file for this run

# NOTE: This file comes from `savi-lang/base-standard-library`
#
# This workflow is responsible for running checks on pushed commits.
#
# The workflow is triggered on pull requests and pushes to the main branch.
# Pull requests are checked on a merge branch, not on the pull request branch.
# It is also triggered daily to check for regressions against the latest
# version of the Savi language and the latest versions of library dependencies.
name: library-check
on:
pull_request:
push:
branches:
- main
schedule:
- cron: "0 10 * * *" # daily at 10:00 UTC
jobs:
# Run the `spec` binary for this library.
spec:
if: github.repository != 'savi-lang/base-standard-library' # skip base repo
strategy:
fail-fast: false
matrix:
include:
# - { os: ubuntu-latest, shell: bash }
# - { os: macos-latest, shell: bash }
- { os: windows-latest, shell: 'wsl-bash {0}' }
runs-on: ${{ matrix.os }}
defaults:
run:
shell: ${{ matrix.shell }}
env:
LLVM_VERSION: 18 # (must also update Windows step below)
steps:
- uses: actions/checkout@v2
- uses: savi-lang/action-install@v1
- name: Install LLVM (Linux)
if: runner.os == 'Linux'
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh $LLVM_VERSION
sudo ln -s "/usr/lib/llvm-$LLVM_VERSION/lib/libLLVM-$LLVM_VERSION.so" "/usr/lib/llvm-$LLVM_VERSION/lib/libLLVM.so"
echo LIBRARY_PATH="/usr/lib/llvm-$LLVM_VERSION/lib" >> $GITHUB_ENV
- name: Install LLVM (MacOS)
if: runner.os == 'macOS'
run: |
brew install llvm@$LLVM_VERSION
echo LIBRARY_PATH="/opt/homebrew/opt/llvm/lib" >> $GITHUB_ENV
- name: Install LLVM0 (Windows step 1)
if: runner.os == 'Windows'
run: |
curl -o llvm-installer.exe "https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/LLVM-18.1.8-win64.exe"
ls -la ./llvm-installer.exe
chmod +x ./llvm-installer.exe
./llvm-installer.exe /S
echo COOL
# - name: Install LLVM (Windows step 2)
# if: runner.os == 'Windows'
# shell: powershell
# run: |
# Install-Module -Name WebKitDev -Force
# $baseurl = "https://github.com/llvm/llvm-project/releases/download"
# $url = "$baseurl/llvmorg-18.1.8/LLVM-18.1.8-win64.exe"
# $options = @( '/D=C:\Program Files\LLVM' )
# Install-FromExe -Name 'LLVM' -Url $url -Options $options -noVerify
# - name: Install LLVM2 (Windows step 3)
# if: runner.os == 'Windows'
# run: |
# ls C:\Program Files\LLVM
- run: savi deps update --for spec
- run: savi run spec ${{ runner.os == 'Windows' && '--cross-compile=x86_64-unknown-windows-msvc' || '' }}
# Check formatting of all files in the repository.
format:
if: github.repository != 'savi-lang/base-standard-library' # skip base repo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: savi-lang/action-install@v1
- run: savi format --check
##
# NOTE: The following jobs do not come from `savi-lang/base-standard-library`.
#
# Add any custom jobs you need below this comment.
# The area above this comment is reserved for future standard jobs.