Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try github action #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: build and test Visual D

on: [push, pull_request]

env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: visuald_vs10.sln

# Configuration type to build.
D_COMPILER: dmd
CONFIG: Release COFF32
CONFIG_DMDSERVER: Release COFF32

jobs:
build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Install D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: dmd-2.098.1
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: Install Visual D
shell: pwsh
run: |
curl -Lo VisualD-v1.2.0.exe https://github.com/dlang/visuald/releases/download/v1.2.0/VisualD-v1.2.0.exe
.\VisualD-v1.2.0.exe /S
- name: configure Visual D
shell: cmd
run: |
echo wd=%CD%
where dmd
reg add "HKLM\SOFTWARE\DMD" /v InstallationFolder /t REG_SZ /d C:\hostedtoolcache\windows\dc\dmd-2.098.1\x64\dmd2 /reg:32 /f
rem disable link dependencies monitoring, fails on AppVeyor server
reg add "HKLM\SOFTWARE\Microsoft\VisualStudio\14.0\ToolsOptionsPages\Projects\Visual D Settings" /v optlinkDeps /t REG_DWORD /d 0 /reg:32 /f
- name: Print environment info
shell: cmd
run: |
set
msbuild /version
- name: Build visuald
working-directory: ${{env.GITHUB_WORKSPACE}}
shell: cmd
run: |
call "c:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
echo wd=%CD%
rem Fetch submodules
git submodule update --init --recursive
rem ignore failure once, in case it needs reloading the sdk project
nmake "CONFIG=${{env.CONFIG}}" prerequisites || nmake "CONFIG=${{env.CONFIG}}" prerequisites
rem build Visual D
nmake "CONFIG=${{env.CONFIG}}" visuald_vs
rem build and run Visual D unittests
nmake "CONFIG=${{env.CONFIG}}" "CONFIG_DMDSERVER=${{env.CONFIG_DMDSERVER}}" visuald_test dmdserver_test