From b32798b37639013d5ceff827af0b164153e1a0af Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Mon, 21 Sep 2020 06:28:58 -0500 Subject: [PATCH 01/18] CI Build Clang --- .github/workflows/ci.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..3a9f0a5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: Build + +on: + - push + +jobs: + Build_Clang: + if: "!contains(github.event.head_commit.message, '[skip ci]')" + + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - windows-2019 + - ubuntu-20.04 + - macOS-10.15 + steps: + + Skip: + if: "contains(github.event.head_commit.message, '[skip ci]')" + runs-on: ubuntu-latest + steps: + - name: Skip CI 🚫 + run: echo skip CI From 53ab61c27a5fd0db326832f5cebe50c3b46a3786 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Mon, 21 Sep 2020 06:29:07 -0500 Subject: [PATCH 02/18] Windows Dependencies --- .github/workflows/ci.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a9f0a5..69da028 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,22 @@ jobs: - ubuntu-20.04 - macOS-10.15 steps: + # Install Dependencies + - name: Windows Dependencies + if: startsWith(matrix.os,'windows') + shell: pwsh + run: | + echo "Clang (Visual Studio) is already included in the image" + $clpath = vswhere -products * -latest -prerelease -find **/Hostx64/x64/* # for x64 + [Environment]::SetEnvironmentVariable("Path", $env:Path + ";$clpath", "User") + $clangpath = vswhere -products * -latest -prerelease -find **/Llvm/bin/* + [Environment]::SetEnvironmentVariable("Path", $env:Path + ";$clangpath", "User") + $vcvarsallpath = vswhere -products * -latest -prerelease -find **/Auxiliary/Build/* + [Environment]::SetEnvironmentVariable("Path", $env:Path + ";$vcvarsallpath", "User") + - name: Windows Setup Visual Studio Command Prompt + uses: ilammy/msvc-dev-cmd@v1.3.0 + with: + arch: x64 Skip: if: "contains(github.event.head_commit.message, '[skip ci]')" From 33965bd86626ff9245c3a08621d0eb0f24e43a05 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Mon, 21 Sep 2020 06:29:14 -0500 Subject: [PATCH 03/18] Ubuntu Dependencies --- .github/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69da028..fb4982a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,6 +33,15 @@ jobs: with: arch: x64 + - name: Ubuntu Dependencies + if: startsWith(matrix.os,'ubuntu') + run: | + echo "clang 9 is already included in the image" + sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-9 10 + sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-9 10 + sudo update-alternatives --config clang + sudo update-alternatives --config clang++ + clang++ -v Skip: if: "contains(github.event.head_commit.message, '[skip ci]')" runs-on: ubuntu-latest From 2f008f67bfc5f2221c576a589649608247e9ed4f Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Mon, 21 Sep 2020 06:29:21 -0500 Subject: [PATCH 04/18] MacOS Dependencies --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb4982a..189daaf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,6 +42,13 @@ jobs: sudo update-alternatives --config clang sudo update-alternatives --config clang++ clang++ -v + + - name: MacOS Dependencies + if: startsWith(matrix.os,'macOS') + run: | + echo "clang 11 is already included in the image" + clang++ -v + Skip: if: "contains(github.event.head_commit.message, '[skip ci]')" runs-on: ubuntu-latest From 344927dc82ce846eab0641f65e016b70579028c0 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Mon, 21 Sep 2020 07:03:12 -0500 Subject: [PATCH 05/18] Checkout --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 189daaf..3adac2a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,6 +49,12 @@ jobs: echo "clang 11 is already included in the image" clang++ -v + # Checkout + - name: Checkout master branch + uses: actions/checkout@v2 + with: + submodules: recursive + Skip: if: "contains(github.event.head_commit.message, '[skip ci]')" runs-on: ubuntu-latest From dbf50aeca0fcd0825e04f05de71d0236f4eecd51 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Mon, 21 Sep 2020 06:40:36 -0500 Subject: [PATCH 06/18] checkout upstream repository --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3adac2a..ff318d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,6 +53,7 @@ jobs: - name: Checkout master branch uses: actions/checkout@v2 with: + repository: 'build2/build2-toolchain' submodules: recursive Skip: From a2f9049c52388ac4e876db176c157daba644ff9a Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Mon, 21 Sep 2020 06:29:34 -0500 Subject: [PATCH 07/18] Windows Build by Clang --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff318d2..35af9a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,6 +56,12 @@ jobs: repository: 'build2/build2-toolchain' submodules: recursive + # Build + - name: Windows Build by Clang + if: startsWith(matrix.os,'windows') + run: | + ./build-clang.bat --install-dir C:/dist-windows-clang + Skip: if: "contains(github.event.head_commit.message, '[skip ci]')" runs-on: ubuntu-latest From 919a2974db2fa02f2d0b7f8284c924008c44a973 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Mon, 21 Sep 2020 06:32:49 -0500 Subject: [PATCH 08/18] Ubuntu Build by Clang --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35af9a4..feb69d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,6 +62,11 @@ jobs: run: | ./build-clang.bat --install-dir C:/dist-windows-clang + - name: Ubuntu Build by Clang + if: startsWith(matrix.os,'ubuntu') + run: | + ./build.sh --install-dir ~/dist-ubuntu-clang --sudo sudo clang++ + Skip: if: "contains(github.event.head_commit.message, '[skip ci]')" runs-on: ubuntu-latest From 5c83fffe4b57112463ce5e077bb9bb4d56162f08 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Mon, 21 Sep 2020 07:00:42 -0500 Subject: [PATCH 09/18] MacOS Build by Clang --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index feb69d4..13810dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,6 +67,11 @@ jobs: run: | ./build.sh --install-dir ~/dist-ubuntu-clang --sudo sudo clang++ + - name: MacOS Build by Clang + if: startsWith(matrix.os,'macOS') + run: | + ./build.sh --install-dir ~/dist-macos-clang --sudo sudo clang++ + Skip: if: "contains(github.event.head_commit.message, '[skip ci]')" runs-on: ubuntu-latest From 769bbb58d733bc2e956d1931844fe655c52567e9 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Mon, 21 Sep 2020 06:33:04 -0500 Subject: [PATCH 10/18] Upload dist-windows-clang --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13810dd..986c959 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,6 +72,14 @@ jobs: run: | ./build.sh --install-dir ~/dist-macos-clang --sudo sudo clang++ + # Upload + - name: Upload dist-windows-clang + if: startsWith(matrix.os,'windows') + uses: actions/upload-artifact@v2 + with: + name: dist-windows-clang + path: C:/dist-windows-clang + Skip: if: "contains(github.event.head_commit.message, '[skip ci]')" runs-on: ubuntu-latest From c4de05861313718252e55776654a7dc9276d8a45 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Mon, 21 Sep 2020 07:01:22 -0500 Subject: [PATCH 11/18] Upload dist-ubuntu-clang --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 986c959..b5b31fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,6 +80,13 @@ jobs: name: dist-windows-clang path: C:/dist-windows-clang + - name: Upload dist-ubuntu-clang + if: startsWith(matrix.os,'ubuntu') + uses: actions/upload-artifact@v2 + with: + name: dist-ubuntu-clang + path: ~/dist-ubuntu-clang + Skip: if: "contains(github.event.head_commit.message, '[skip ci]')" runs-on: ubuntu-latest From 42f2aa424a07dbf7e6902aaa11b563b022767097 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Mon, 21 Sep 2020 07:02:15 -0500 Subject: [PATCH 12/18] Upload dist-macos-clang --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5b31fc..dfff28b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,6 +87,13 @@ jobs: name: dist-ubuntu-clang path: ~/dist-ubuntu-clang + - name: Upload dist-macos-clang + if: startsWith(matrix.os,'macOS') + uses: actions/upload-artifact@v2 + with: + name: dist-macos-clang + path: ~/dist-macos-clang + Skip: if: "contains(github.event.head_commit.message, '[skip ci]')" runs-on: ubuntu-latest From f63be5ab9c4bf47b7819ff35ffce35e319de0fcc Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Mon, 21 Sep 2020 07:43:42 -0500 Subject: [PATCH 13/18] remove install-dir the meaning is different --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dfff28b..f62a35b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,17 +60,17 @@ jobs: - name: Windows Build by Clang if: startsWith(matrix.os,'windows') run: | - ./build-clang.bat --install-dir C:/dist-windows-clang + ./build-clang.bat C:/dist-windows-clang - name: Ubuntu Build by Clang if: startsWith(matrix.os,'ubuntu') run: | - ./build.sh --install-dir ~/dist-ubuntu-clang --sudo sudo clang++ + ./build.sh --sudo sudo clang++ ~/dist-ubuntu-clang - name: MacOS Build by Clang if: startsWith(matrix.os,'macOS') run: | - ./build.sh --install-dir ~/dist-macos-clang --sudo sudo clang++ + ./build.sh --sudo sudo clang++ ~/dist-macos-clang # Upload - name: Upload dist-windows-clang From 0b3b14c3ea2b1b23df013a6e87754052f248181a Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 21 Jan 2021 00:33:18 -0600 Subject: [PATCH 14/18] Set fetch-depth to 0 https://github.com/actions/checkout/issues/402#issuecomment-764202365 --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f62a35b..692bcc7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,6 +55,7 @@ jobs: with: repository: 'build2/build2-toolchain' submodules: recursive + fetch-depth: 0 # Build - name: Windows Build by Clang From 4d99df1f72c465f8a46f13c2619f1986bfbe0516 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 21 Jan 2021 00:43:04 -0600 Subject: [PATCH 15/18] Rename build.sh to build.sh.in --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 692bcc7..d0e114b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,17 +61,17 @@ jobs: - name: Windows Build by Clang if: startsWith(matrix.os,'windows') run: | - ./build-clang.bat C:/dist-windows-clang + ./build-clang.bat.in C:/dist-windows-clang - name: Ubuntu Build by Clang if: startsWith(matrix.os,'ubuntu') run: | - ./build.sh --sudo sudo clang++ ~/dist-ubuntu-clang + ./build.sh.in --sudo sudo clang++ ~/dist-ubuntu-clang - name: MacOS Build by Clang if: startsWith(matrix.os,'macOS') run: | - ./build.sh --sudo sudo clang++ ~/dist-macos-clang + ./build.sh.in --sudo sudo clang++ ~/dist-macos-clang # Upload - name: Upload dist-windows-clang From e2c498d44fd85a3acc4fe80994ee6b66c1e646c6 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 21 Jan 2021 00:47:09 -0600 Subject: [PATCH 16/18] Use ilammy/msvc-dev-cmd@v1 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0e114b..875be92 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: $vcvarsallpath = vswhere -products * -latest -prerelease -find **/Auxiliary/Build/* [Environment]::SetEnvironmentVariable("Path", $env:Path + ";$vcvarsallpath", "User") - name: Windows Setup Visual Studio Command Prompt - uses: ilammy/msvc-dev-cmd@v1.3.0 + uses: ilammy/msvc-dev-cmd@v1 with: arch: x64 From f2f8ac446e0323a4ab6267a0dfd3c20293c934b4 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 21 Jan 2021 00:47:30 -0600 Subject: [PATCH 17/18] Add sudo before the bash scripts --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 875be92..b271a5f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,12 +66,12 @@ jobs: - name: Ubuntu Build by Clang if: startsWith(matrix.os,'ubuntu') run: | - ./build.sh.in --sudo sudo clang++ ~/dist-ubuntu-clang + sudo ./build.sh.in --sudo sudo clang++ ~/dist-ubuntu-clang - name: MacOS Build by Clang if: startsWith(matrix.os,'macOS') run: | - ./build.sh.in --sudo sudo clang++ ~/dist-macos-clang + sudo ./build.sh.in --sudo sudo clang++ ~/dist-macos-clang # Upload - name: Upload dist-windows-clang From 1dd6f3d88aadf0ef8384ecb6ff80963f2ea8d87a Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 21 Jan 2021 00:53:47 -0600 Subject: [PATCH 18/18] Add sh before the build scripts --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b271a5f..4a4cadf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,12 +66,12 @@ jobs: - name: Ubuntu Build by Clang if: startsWith(matrix.os,'ubuntu') run: | - sudo ./build.sh.in --sudo sudo clang++ ~/dist-ubuntu-clang + sudo sh ./build.sh.in --sudo sudo clang++ ~/dist-ubuntu-clang - name: MacOS Build by Clang if: startsWith(matrix.os,'macOS') run: | - sudo ./build.sh.in --sudo sudo clang++ ~/dist-macos-clang + sudo sh ./build.sh.in --sudo sudo clang++ ~/dist-macos-clang # Upload - name: Upload dist-windows-clang