-
Notifications
You must be signed in to change notification settings - Fork 118
104 lines (90 loc) · 3.04 KB
/
windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Windows Installer
concurrency:
# Don't cancel on master, creating a PR when a push workflow is already going will cancel the push workflow in favour of the PR workflow
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_id || github.event.number && github.head_ref || github.ref_name }}
cancel-in-progress: true
on:
merge_group:
workflow_call:
inputs:
tag:
description: 'Release version (tag name)'
default: ''
required: true
type: string
push:
branches:
- master
- release/**
pull_request:
branches:
- master
- release/**
# TODO : https://github.com/neuronsimulator/nrn/issues/1063
# paths-ignore:
# - '**.md'
# - '**.rst'
# - 'docs/**'
env:
MSYS2_ROOT: C:\msys64
jobs:
WindowsInstaller:
runs-on: windows-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.tag }}
- name: Retrieve rxd test data
run: |
git submodule update --init test/rxd/testdata
shell: powershell
working-directory: ${{runner.workspace}}\nrn
- name: Set up Python3
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Download Dependencies
run: |
.\nrn\ci\win_download_deps.cmd
shell: powershell
working-directory: ${{runner.workspace}}
- name: Install Dependencies
run: .\nrn\ci\win_install_deps.cmd
shell: powershell
working-directory: ${{runner.workspace}}
- name: Build and Create Installer
run: |
rm.exe C:\WINDOWS\system32\bash.EXE
%MSYS2_ROOT%\usr\bin\bash -lc "$BUILD_SOURCESDIRECTORY/ci/win_build_cmake.sh"
shell: cmd
working-directory: ${{runner.workspace}}\nrn
env:
BUILD_SOURCESDIRECTORY: ${{runner.workspace}}\nrn
# This step will set up an SSH connection on tmate.io for live debugging.
# To enable it, you have to:
# * add 'live-debug-win' to your PR title
# * push something to your PR branch (note that just re-running the pipeline disregards the title update)
- name: live debug session on failure (manual steps required, check `.github/windows.yml`)
if: failure() && contains(github.event.pull_request.title, 'live-debug-win')
uses: mxschmitt/action-tmate@v3
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: nrn-nightly-AMD64.exe
path: ${{runner.workspace}}\nrn\nrn-nightly-AMD64.exe
- name: Run installer and launch .hoc associaton test
run: .\ci\win_install_neuron.cmd
shell: cmd
working-directory: ${{runner.workspace}}\nrn
- name: Test Installer
run: .\ci\win_test_installer.cmd
shell: cmd
working-directory: ${{runner.workspace}}\nrn
- name: Publish Release Installer
working-directory: ${{runner.workspace}}\nrn
if: inputs.tag != ''
run: |
gh release upload ${{ inputs.tag }} nrn-nightly-AMD64.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}