Skip to content

Commit aa26ef1

Browse files
authored
build and analyse with github action (#159)
* build and analyse with github action * move files to right dir * corrected once more path * try to correct ci build yml * use nuget restore * correct config files for packages and props for CI usage * get also code analysis running * further fix for analysis * add also 32bit to CI
1 parent 3e02451 commit aa26ef1

File tree

3 files changed

+128
-1
lines changed

3 files changed

+128
-1
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
version: 2
77
updates:
88
- package-ecosystem: "nuget" # See documentation for possible values
9-
directory: "/" # Location of package manifests
9+
directory: "/PythonScript/PythonScript/project" # Location of package manifests
1010
schedule:
1111
interval: "daily"

.github/workflows/CI_build.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Continuous Integration
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: windows-2016
9+
strategy:
10+
max-parallel: 4
11+
matrix:
12+
build_configuration: [Release, Debug]
13+
build_platform: [x64, Win32]
14+
15+
steps:
16+
- name: Checkout repo
17+
uses: actions/checkout@v2
18+
with:
19+
submodules: 'true'
20+
21+
- name: Add msbuild to PATH
22+
uses: microsoft/[email protected]
23+
24+
- name: "Use CI config files"
25+
run: |
26+
Write-Host "remove PythonSettings.props" -ForegroundColor Green
27+
Remove-Item '.\PythonScript\project\PythonSettings.props'
28+
Rename-Item -Path ".\PythonScript\project\PythonSettings_appveyor.props" -NewName "PythonSettings.props"
29+
Write-Host "remove packages.config" -ForegroundColor Green
30+
Remove-Item '.\PythonScript\project\packages.config'
31+
Rename-Item -Path ".\PythonScript\project\packages_appveyor.config" -NewName "packages.config"
32+
shell: pwsh
33+
working-directory: .
34+
35+
- name: Setup NuGet.exe
36+
uses: nuget/setup-nuget@v1
37+
38+
- name: Restore
39+
working-directory: .
40+
run: nuget restore PythonScript.sln
41+
42+
- name: MSBuild of solution
43+
working-directory: .
44+
run: msbuild PythonScript.sln /m /verbosity:minimal /p:configuration="${{ matrix.build_configuration }}" /p:platform="${{ matrix.build_platform }}"
45+
46+
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [master, gh_action ]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: [master]
9+
schedule:
10+
- cron: '0 23 * * 6'
11+
12+
jobs:
13+
analyze:
14+
name: Analyze
15+
runs-on: windows-2016
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v2
20+
with:
21+
# We must fetch at least the immediate parents so that if this is
22+
# a pull request then we can checkout the head.
23+
fetch-depth: 2
24+
submodules: 'true'
25+
26+
# If this run was triggered by a pull request event, then checkout
27+
# the head of the pull request instead of the merge commit.
28+
- run: git checkout HEAD^2
29+
if: ${{ github.event_name == 'pull_request' }}
30+
31+
# Initializes the CodeQL tools for scanning.
32+
- name: Initialize CodeQL
33+
uses: github/codeql-action/init@v1
34+
# Override language selection by uncommenting this and choosing your languages
35+
# with:
36+
# languages: go, javascript, csharp, python, cpp, java
37+
38+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
39+
# If this step fails, then you should remove it and run the build manually (see below)
40+
#- name: Autobuild
41+
# uses: github/codeql-action/autobuild@v1
42+
43+
# ℹ️ Command-line programs to run using the OS shell.
44+
# 📚 https://git.io/JvXDl
45+
46+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
47+
# and modify them (or add more) to build your code if your project
48+
# uses a compiled language
49+
50+
#- run: |
51+
# make bootstrap
52+
# make release
53+
54+
55+
- name: Add msbuild to PATH
56+
uses: microsoft/[email protected]
57+
58+
- name: "Use CI config files"
59+
run: |
60+
Write-Host "remove PythonSettings.props" -ForegroundColor Green
61+
Remove-Item '.\PythonScript\project\PythonSettings.props'
62+
Rename-Item -Path ".\PythonScript\project\PythonSettings_appveyor.props" -NewName "PythonSettings.props"
63+
Write-Host "remove packages.config" -ForegroundColor Green
64+
Remove-Item '.\PythonScript\project\packages.config'
65+
Rename-Item -Path ".\PythonScript\project\packages_appveyor.config" -NewName "packages.config"
66+
shell: pwsh
67+
working-directory: .
68+
69+
- name: Setup NuGet.exe
70+
uses: nuget/setup-nuget@v1
71+
72+
- name: Restore
73+
working-directory: .
74+
run: nuget restore PythonScript.sln
75+
76+
- name: MSBuild of solution
77+
working-directory: .
78+
run: msbuild PythonScript.sln /m /verbosity:minimal /p:configuration="Debug" /p:platform="x64"
79+
80+
- name: Perform CodeQL Analysis
81+
uses: github/codeql-action/analyze@v1

0 commit comments

Comments
 (0)