Skip to content

Redub support

Redub support #124

Workflow file for this run

name: Artifacts
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
actions: read
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
arch: amd64
- os: ubuntu-24.04-arm
arch: arm64
- os: macos-latest
arch: arm64
- os: windows-latest
arch: amd64
fail-fast: false
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- uses: dlang-community/setup-dlang@v2
with:
compiler: ldc-latest
- name: Build
run: |
dub -b release
- name: Tests
run: |
dub -b release -- install -v
dub -b release -- install ldc2-master -v
dub -b release -- list -v
dub -b release -- uninstall ldc2-1.40.0 -v
dub -b release -- list -v
dub -b release -- run -v -- --version
- name: Compress artifacts (Windows)
if: runner.os == 'Windows'
run: |
Compress-Archive -Path bin/* -DestinationPath bin/ldcup-${{ matrix.os }}-${{ matrix.arch }}.zip
- name: Compress artifacts (Unix)
if: runner.os != 'Windows'
run: |
cd bin && tar -cJf ldcup-${{ matrix.os }}-${{ matrix.arch }}.tar.xz *
- uses: actions/upload-artifact@v4
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
with:
name: ldcup-${{ matrix.os }}-${{ matrix.arch }}
path: bin/ldcup-${{ matrix.os }}-${{ matrix.arch }}.*
- uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: 'bin/ldcup-${{ matrix.os }}-${{ matrix.arch }}.*'
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}
freebsd:
strategy:
matrix:
arch: [amd64]
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run FreeBSD VM
uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: |
pkg install -y dub ldc
run: |
dub -b release
dub -b release -- install -v
dub -b release -- install ldc2-master -v
dub -b release -- list -v
dub -b release -- uninstall ldc2-1.40.0 -v
dub -b release -- list -v
dub -b release -- run -v -- --version
tar -cJf bin/ldcup-freebsd14.2-${{ matrix.arch }}.tar.xz -C bin .
- uses: actions/upload-artifact@v4
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
with:
name: ldcup-freebsd-14.2-amd64
path: bin/ldcup-freebsd14.2-${{ matrix.arch }}.tar.xz
- uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: 'bin/ldcup-freebsd14.2-${{ matrix.arch }}.tar.xz'
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}
alpine:
strategy:
matrix:
arch: [amd64]
fail-fast: false
runs-on: ubuntu-latest
container:
image: alpine:latest
defaults:
run:
shell: sh
steps:
- uses: actions/checkout@v4
- name: Prepare
run: |
apk update
apk add --no-cache ldc dub clang xz
- name: Build
run: |
dub -b release
touch $HOME/.profile
- name: Tests
run: |
dub -b release -- install ldc2-master -v
dub -b release -- list -v
source $HOME/.profile
dub -b release -- install redub -v
dub -b release -- run -v -- --version
redub --version
- name: Compress artifacts
run: |
cd bin && tar -cJf ldcup-alpine-${{ matrix.arch }}.tar.xz *
- uses: actions/upload-artifact@v4
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
with:
name: ldcup-alpine-${{ matrix.arch }}
path: bin/ldcup-alpine-${{ matrix.arch }}.tar.xz
- uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: 'bin/ldcup-alpine-${{ matrix.arch }}.tar.xz'
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}