CI #329
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: CI | |
on: | |
push: | |
branches: '*' | |
tags: v* | |
pull_request: | |
branches: | |
- master | |
schedule: | |
- cron: 0 0 * * * | |
env: | |
MACOSX_DEPLOYMENT_TARGET: 10.9 | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
test: | |
name: ${{ matrix.data.os.target_triple }} ${{ matrix.compiler }} | |
runs-on: ${{ matrix.data.os.host }} | |
continue-on-error: ${{ matrix.nightly == 'nightly' }} | |
timeout-minutes: 20 | |
env: | |
DSTEP_LLVM_VERSION: ${{ matrix.llvm }} | |
DSTEP_COMPILER: ${{ matrix.compiler }} | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [x86_64] | |
data: | |
- os: | |
host: ubuntu-latest | |
target_triple: x86_64-alpine-linux-musl | |
docker: true | |
- os: | |
host: macOS-latest | |
target_triple: x86_64-apple-macos10.9 | |
- os: | |
host: windows-latest | |
target_triple: x86_64-pc-windows-msvc | |
- os: | |
target: freebsd | |
version: '13.1' | |
target_triple: x86_64-unknown-freebsd13.1 | |
host: macOS-latest | |
cross_platform_actions: true | |
compiler: | |
- ldc-latest | |
llvm: | |
- '15.0.7' | |
include: | |
- compiler: dmd-latest | |
llvm: '15.0.7' | |
arch: x86_64 | |
data: | |
os: | |
host: windows-latest | |
target_triple: x86_64-pc-windows-msvc | |
- compiler: dmd-beta | |
llvm: '15.0.7' | |
arch: x86_64 | |
data: | |
os: | |
host: windows-latest | |
target_triple: x86_64-pc-windows-msvc | |
- compiler: ldc-beta | |
llvm: '15.0.7' | |
arch: x86_64 | |
data: | |
os: | |
host: ubuntu-latest | |
target_triple: x86_64-alpine-linux-musl | |
docker: true | |
- compiler: dmd-master | |
llvm: '15.0.7' | |
arch: x86_64 | |
nightly: nightly | |
data: | |
os: | |
host: windows-latest | |
target_triple: x86_64-pc-windows-msvc | |
steps: | |
- name: Clone Repository | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
# - name: Install Compiler | |
# if: ${{ !matrix.data.cross_platform_actions && !matrix.data.docker }} | |
# uses: dlang-community/setup-dlang@v1 | |
# with: | |
# compiler: ${{ matrix.compiler }} | |
- name: Download LLVM | |
if: runner.os != 'Windows' | |
run: | | |
curl -f -L -o llvm.tar.xz --retry 3 'https://github.com/jacob-carlborg/clang-builder/releases/download/v${{ matrix.llvm }}%2B0.0.2-rc2/llvm-${{ matrix.llvm }}-${{ matrix.data.os.target_triple }}.tar.xz' | |
tar xf llvm.tar.xz | |
- name: Download LLVM | |
if: runner.os == 'Windows' | |
run: | | |
curl -f -L -o llvm.7z --retry 3 'https://github.com/jacob-carlborg/clang-builder/releases/download/v${{ matrix.llvm }}%2B0.0.2-rc2/llvm-${{ matrix.llvm }}-${{ matrix.data.os.target_triple }}.7z' | |
7z x llvm.7z | |
# - name: Setup tmate session | |
# uses: mxschmitt/action-tmate@v3 | |
# with: | |
# limit-access-to-actor: true | |
- name: Test | |
if: ${{ !matrix.data.cross_platform_actions && !matrix.data.docker }} | |
run: ./ci.sh | |
- name: Test | |
if: matrix.data.cross_platform_actions | |
uses: cross-platform-actions/[email protected] | |
with: | |
shell: bash | |
operating_system: ${{ matrix.data.os.target }} | |
version: ${{ matrix.data.os.version }} | |
environment_variables: DSTEP_LLVM_VERSION DSTEP_COMPILER | |
run: | | |
sudo pkg install -y llvm git gnupg | |
./ci.sh | |
- name: Set up QEMU | |
if: matrix.data.docker && matrix.arch != 'x86_64' | |
uses: docker/setup-qemu-action@v1 | |
with: | |
platforms: ${{ matrix.arch }} | |
- name: Run Tests in Docker | |
if: matrix.data.docker | |
run: | | |
docker run \ | |
--rm \ | |
-v $(pwd):/${{ github.workspace }} \ | |
-w ${{ github.workspace }} \ | |
-e DSTEP_LLVM_VERSION=${{ env.DSTEP_LLVM_VERSION }} \ | |
--platform linux/${{ matrix.docker_arch || matrix.arch }} \ | |
alpine:edge \ | |
apk add --no-cache git curl bash && \ | |
./ci.sh |