v0.7.5 #41
Workflow file for this run
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: Upload prebuild binaries | |
on: | |
release: | |
types: [published] | |
jobs: | |
nightly: | |
name: Deploy releases | |
strategy: | |
fail-fast: false | |
matrix: | |
# ubuntu / linux must run on kinda old linux for glibc compatibility! | |
os: [ubuntu-20.04, windows-latest, macos-latest] | |
arch: [x86_64] | |
include: | |
# use for 32 bit build | |
- os: windows-latest | |
arch: x86 | |
- os: macos-latest | |
arch: arm64-apple-macos | |
arch_short: arm64 | |
cross: "1" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- id: vars | |
shell: bash | |
run: | | |
if [ -z "${{matrix.arch_short}}" ]; then | |
echo "arch_short=${{matrix.arch}}" >> $GITHUB_OUTPUT | |
else | |
echo "arch_short=${{matrix.arch_short}}" >> $GITHUB_OUTPUT | |
fi | |
- name: Install D compiler | |
uses: dlang-community/setup-dlang@v1 | |
with: | |
compiler: ldc-latest | |
- name: Run tests | |
run: dub test | |
# Linux release | |
- name: Build Linux release | |
run: ./ci/build.sh && rdmd ci/validate_version.d | |
if: matrix.os == 'ubuntu-20.04' | |
env: | |
ARCH: ${{ matrix.arch }} | |
BUILD: release | |
CROSS: ${{ matrix.cross }} | |
- name: Deploy Linux release | |
if: matrix.os == 'ubuntu-20.04' | |
uses: WebFreak001/upload-asset@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
OS: linux-${{ steps.vars.outputs.arch_short }} | |
with: | |
file: ./serve-d.tar.xz | |
mime: application/x-gtar | |
name: serve-d_${TAG}-${OS}.tar.xz | |
# OSX release | |
- name: Build OSX release | |
run: ./ci/build.sh && rdmd ci/validate_version.d | |
if: matrix.os == 'macos-latest' | |
env: | |
MACOSX_DEPLOYMENT_TARGET: '10.12' | |
ARCH: ${{ matrix.arch }} | |
BUILD: release | |
CROSS: ${{ matrix.cross }} | |
- name: Deploy OSX release | |
if: matrix.os == 'macos-latest' | |
uses: WebFreak001/upload-asset@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
OS: osx-${{ steps.vars.outputs.arch_short }} | |
with: | |
file: ./serve-d.tar.xz | |
mime: application/x-gtar | |
name: serve-d_${TAG}-${OS}.tar.xz | |
# Windows release | |
- name: Build Windows release | |
run: (.\ci\build.bat) -and (rdmd ci\validate_version.d) | |
if: matrix.os == 'windows-latest' | |
env: | |
BUILD: release | |
ARCH: ${{ matrix.arch }} | |
CROSS: ${{ matrix.cross }} | |
- name: Deploy Windows release | |
if: matrix.os == 'windows-latest' | |
uses: WebFreak001/upload-asset@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
OS: windows-${{ steps.vars.outputs.arch_short }} | |
with: | |
file: ./serve-d.zip | |
mime: application/zip | |
name: serve-d_${TAG}-${OS}.zip | |
- name: cache dependency binaries | |
uses: WebFreak001/[email protected] | |
with: | |
store: true |