Skip to content

fix: update despacer library #141

fix: update despacer library

fix: update despacer library #141

Workflow file for this run

name: CI
on:
# - pull_request
- push
jobs:
Test:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- windows-latest
- macos-latest
- ubuntu-latest
# - macos-11 # arm64
d:
- "ldc-1.28.0"
node:
- 16
pnpm:
- 6
compiler:
- llvm-12.0.0
cmake:
- "3.22.1"
ninja:
- "1.10.2"
steps:
- uses: actions/checkout@v2
with:
submodules: "true"
# Cache
- name: Cache
id: cache
uses: actions/cache@v2
with:
path: |
~/.dub
~/AppData/Local/dub
~/.pnpm-store
D:\.pnpm-store
./.dub
~/llvm
key: "cache-OS:${{ matrix.os }}-D:${{ matrix.d }}-CXX:${{ matrix.compiler }}-dub:${{ hashFiles('./dub.selections.json')}}-pnpm:${{ hashFiles('./pnpm-lock.yaml') }}"
restore-keys: |
"cache-OS:${{ matrix.os }}-D:${{ matrix.d }}-CXX:${{ matrix.compiler }}"
# Setup compilers and tools
- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
compiler: ${{ matrix.compiler }}
cmake: ${{ matrix.cmake }}
ninja: ${{ matrix.ninja }}
- name: Setup D
uses: dlang-community/setup-dlang@v1
with:
compiler: ${{ matrix.d }}
- name: Setup Mac Arm64
shell: bash
if: contains(matrix.os, 'macos-11')
run: |
ARCH="arm64"
echo "ARCH=$ARCH" >> $GITHUB_ENV
echo "triple=$ARCH-apple-macos" >> $GITHUB_ENV
echo "DFLAGS='-mtriple=$triple -Xcc=target -Xcc=$ARCH-apple-macos'" >> $GITHUB_ENV
echo "CPPFLAGS=$CPPFLAGS -arch $ARCH" >> $GITHUB_ENV
echo "CFLAGS=$CFLAGS -arch $ARCH" >> $GITHUB_ENV
echo "LDFLAGS=$LDFLAGS -arch $ARCH" >> $GITHUB_ENV
# Manually install ldc
# Due to https://github.com/dlang-community/setup-dlang/issues/51
curl -LJO https://github.com/ldc-developers/ldc/releases/download/v1.28.0/ldc2-1.28.0-osx-$ARCH.tar.xz
tar -xf ldc2-1.28.0-osx-$ARCH.tar.xz
rm ldc2-1.28.0-osx-$ARCH.tar.xz
LDC_PATH="~/ldc"
mkdir -p $LDC_PATH
mv ldc2-1.28.0-osx-$ARCH $LDC_PATH
# Activate ldc
echo "LIBRARY_PATH=$LDC_PATH/lib${LIBRARY_PATH:+:}${LIBRARY_PATH:-}" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$LDC_PATH/lib${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH:-}" >> $GITHUB_ENV
echo "PATH=$LDC_PATH/bin${PATH:+:}${PATH:-}" >> $GITHUB_ENV
echo "DMD=ldmd2" >> $GITHUB_ENV
echo "DC=ldc2" >> $GITHUB_ENV
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Setup Pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ matrix.pnpm }}
# Build and Test
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build.node
- name: Test
run: pnpm test
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
path: ./dist