Skip to content

Commit 2a872aa

Browse files
grendellopjcollins
andauthored
CodeQL pipeline (#3)
Enable CodeQL Co-authored-by: Peter Collins <pecolli@microsoft.com>
1 parent dcfe7dd commit 2a872aa

File tree

5 files changed

+123
-2
lines changed

5 files changed

+123
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ jobs:
162162
path: artifacts-macos-xa-utils.tar.bz2
163163

164164
build_llvm_windows:
165-
runs-on: windows-2019
165+
runs-on: windows-latest
166166
steps:
167167
- uses: actions/checkout@v3
168168
with:

1cs-pipeline.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
trigger:
2+
- main
3+
- codeql-pipeline #TODO REMOVE
4+
5+
variables:
6+
- name: BUILD_DIR
7+
value: xa-build
8+
- name: Codeql.Enabled
9+
value: true
10+
11+
jobs:
12+
- job: build_llvm_linux
13+
displayName: Build Linux LLVM
14+
timeoutInMinutes: 180
15+
pool:
16+
vmImage: ubuntu-latest
17+
steps:
18+
- checkout: self
19+
submodules: recursive
20+
21+
- script: |
22+
sudo apt-get update
23+
sudo apt-get -f -u install cmake ninja-build chrpath texinfo sharutils libffi-dev lsb-release patchutils diffstat xz-utils python3-dev libedit-dev libncurses5-dev swig python3-six python3-sphinx binutils-dev libxml2-dev libjsoncpp-dev pkg-config lcov procps help2man zlib1g-dev g++-multilib libjs-mathjax python3-recommonmark libpfm4-dev python3-setuptools libz3-dev ccache
24+
displayName: Install LLVM build dependencies
25+
26+
- script: ./build-llvm.sh
27+
env:
28+
CC: gcc-10
29+
CXX: g++-10
30+
displayName: Build LLVM
31+
32+
- job: build_xautils_linux
33+
displayName: build Linux and Windows Xamarin.Android Utilities
34+
timeoutInMinutes: 180
35+
pool:
36+
vmImage: ubuntu-latest
37+
steps:
38+
- checkout: self
39+
submodules: recursive
40+
41+
- script: |
42+
sudo apt-get update
43+
sudo apt-get -f -u install mingw-w64 cmake ninja-build xz-utils zlib1g-dev libz-mingw-w64-dev
44+
displayName: Install Xamarin.Android Utilities build dependencies
45+
46+
- script: ./build-xa-utils.sh
47+
env:
48+
CC: gcc-10
49+
CXX: g++-10
50+
displayName: Build utilities
51+
52+
- job: build_llvm_macos
53+
displayName: Build macOS LLVM
54+
timeoutInMinutes: 180
55+
pool:
56+
vmImage: macOS-latest
57+
steps:
58+
- checkout: self
59+
submodules: recursive
60+
61+
- script: |
62+
brew update
63+
brew install cmake ninja ccache
64+
displayName: Install LLVM build dependencies
65+
66+
- script: bash ./build-llvm.sh
67+
displayName: build LLVM
68+
69+
- job: build_xautils_macos
70+
displayName: Build macOS Xamarin.Android Utilities
71+
timeoutInMinutes: 180
72+
pool:
73+
vmImage: macOS-latest
74+
steps:
75+
- checkout: self
76+
submodules: recursive
77+
78+
- script: |
79+
brew update
80+
brew install make cmake xz ninja
81+
displayName: Install Xamarin.Android Utilities build dependencies
82+
83+
- script: bash ./build-xa-utils.sh
84+
displayName: Build utilities
85+
86+
- job: build_windows
87+
displayName: Build Windows
88+
timeoutInMinutes: 180
89+
pool:
90+
vmImage: windows-latest
91+
steps:
92+
- checkout: self
93+
submodules: recursive
94+
95+
- script: ./build-llvm-azure.cmd
96+
displayName: Build Windows LLVM

build-llvm-azure.cmd

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FOR /F "tokens=1 delims=" %%F IN ('.\scripts\vswhere.cmd') DO SET result=%%F
2+
CALL "%result%\Common7\Tools\VsDevCmd.bat"
3+
IF ERRORLEVEL 1 CALL:FAILED_CASE
4+
5+
echo "VS path: %result%"
6+
7+
CALL ".\build-llvm.cmd"
8+
IF ERRORLEVEL 1 CALL:FAILED_CASE
9+
GOTO END_CASE
10+
11+
:FAILED_CASE
12+
echo "Failed to find an instance of Visual Studio. Please check it is correctly installed."
13+
GOTO END_CASE
14+
:END_CASE
15+
GOTO :EOF

build-llvm.cmd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ mkdir %HOST_ARTIFACTS_DIR%\bin
2222

2323
cd %HOST_BUILD_DIR%
2424

25-
cmake -G "Visual Studio 16 2019" -A x64 ^
25+
cmake --version
26+
cmake --help
27+
28+
cmake -G "Visual Studio 17 2022" -A x64 ^
2629
-DBUILD_SHARED_LIBS=OFF ^
2730
-DCMAKE_BUILD_TYPE=Release ^
2831
-DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded" ^

scripts/vswhere.cmd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@echo off
2+
SET result = ""
3+
FOR /F "tokens=1 delims=" %%F IN ('"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath') DO SET result=%%F
4+
if "%result%" == "" (
5+
FOR /F "tokens=1 delims=" %%F IN ('"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -prerelease -latest -property installationPath') DO SET result=%%F
6+
)
7+
echo %result%

0 commit comments

Comments
 (0)