diff mbox series

[v5,11/11] ci: Enable Github actions.

Message ID 20200905062333.1087-12-luoyonggang@gmail.com (mailing list archive)
State New, archived
Headers show
Series Green the msys2 CI make | expand

Commit Message

Yonggang Luo Sept. 5, 2020, 6:23 a.m. UTC
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 .github/workflows/main.yml            | 31 +++++++++++++++++++++++++++
 scripts/ci/windows/msys2-download.bat |  4 ++++
 2 files changed, 35 insertions(+)
 create mode 100644 .github/workflows/main.yml
 create mode 100644 scripts/ci/windows/msys2-download.bat
diff mbox series

Patch

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 0000000000..758bbf6641
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,31 @@ 
+# This is a basic workflow to help you get started with Actions
+
+name: CI
+
+# Controls when the action will run. Triggers the workflow on push or pull request
+# events but only for the master branch
+on:
+  push:
+    branches: [ master, msys2 ]
+  pull_request:
+    branches: [ master ]
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+jobs:
+  msys2-build:
+    name: C++ msys2 (Windows)
+    runs-on: windows-latest
+    strategy:
+      fail-fast: false
+    steps:
+      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+      - uses: actions/checkout@v2
+      - name: Install MSYS2
+        run: scripts/ci/windows/msys2-download
+      - name: Build
+        env:
+          MSYS: winsymlinks:nativestrict
+          MSYSTEM: MINGW64
+          CHERE_INVOKING: 1
+        run: C:\tools\msys64\usr\bin\bash.exe -lc "sh scripts/ci/windows/msys2-build.sh"
+
diff --git a/scripts/ci/windows/msys2-download.bat b/scripts/ci/windows/msys2-download.bat
new file mode 100644
index 0000000000..2c7c41899e
--- /dev/null
+++ b/scripts/ci/windows/msys2-download.bat
@@ -0,0 +1,4 @@ 
+mkdir C:\tools
+cd /d C:\tools
+curl -LJ -s https://github.com/lygstate/qemu/releases/download/v5.1.0/msys64-v5.1.0.7z --output msys64.7z
+7z -mmt8 x msys64.7z