From 48b11f33f745b1aeb94f473f0b41fb2ac7fe4a47 Mon Sep 17 00:00:00 2001 From: Alexandre Plateau Date: Sun, 6 Nov 2022 16:48:10 +0100 Subject: [PATCH 1/2] ci: reorganizing the GitHub CI workflows --- .github/workflows/ci.yml | 40 +++++++++++++++++++++++++-- .github/workflows/clang-format.yml | 23 --------------- .github/workflows/repo-visualizer.yml | 23 --------------- 3 files changed, 37 insertions(+), 49 deletions(-) delete mode 100644 .github/workflows/clang-format.yml delete mode 100644 .github/workflows/repo-visualizer.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2f003fe3..50c1ab05a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,15 +1,13 @@ -name: "CMake" +name: "Building and testing ArkScript" on: push: branches: [dev, master] paths-ignore: - - '.github/workflows/clang-format.yml' - '.github/workflows/docker.yml' - '.github/workflows/label.yml' - '.github/workflows/lizard.yml' - '.github/workflows/release.yml' - - '.github/workflows/repo-visualizer.yml' - '.vscode/*.*' - 'examples/*.ark' - 'images/*.*' @@ -27,9 +25,45 @@ env: SQLITE_VERSION: 3390100 # 3.39.1 jobs: + check: + name: Formatting check + runs-on: ubuntu-latest + + strategy: + matrix: + path: + - 'src' + - 'include' + + steps: + - uses: actions/checkout@v2 + + - name: Run clang-format check for C++ + uses: HorstBaerbel/action-clang-format@master + with: + scandir: ${{ matrix.path }} + style: 'file' + + repo_visualizer: + runs-on: ubuntu-latest + needs: [] + + steps: + - name: Checkout code + uses: actions/checkout@master + + - name: Update diagram + uses: githubocto/repo-visualizer@main + with: + excluded_paths: 'dist,node_modules,submodules' + should_push: false + output_file: 'diagram.svg' + artifact_name: 'diagram' + build: runs-on: ${{ matrix.config.os }} name: ${{ matrix.config.name }} + needs: [check] strategy: fail-fast: false diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml deleted file mode 100644 index 015c6c839..000000000 --- a/.github/workflows/clang-format.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: clang-format check - -on: [pull_request] - -jobs: - check: - name: Formatting check - runs-on: ubuntu-latest - - strategy: - matrix: - path: - - 'src' - - 'include' - - steps: - - uses: actions/checkout@v2 - - - name: Run clang-format check for C++ - uses: HorstBaerbel/action-clang-format@master - with: - scandir: ${{ matrix.path }} - style: 'file' diff --git a/.github/workflows/repo-visualizer.yml b/.github/workflows/repo-visualizer.yml deleted file mode 100644 index 2764224e2..000000000 --- a/.github/workflows/repo-visualizer.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Repo visualizer - -on: - push: - branches: [ master, dev ] - pull_request: - branches: [ master, dev ] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@master - - - name: Update diagram - uses: githubocto/repo-visualizer@main - with: - excluded_paths: 'dist,node_modules,submodules' - should_push: false - output_file: 'diagram.svg' - artifact_name: 'diagram' From 6c32a8310d873ee9cdb0764f5609b8b2ac86c710 Mon Sep 17 00:00:00 2001 From: Alexandre Plateau Date: Sun, 6 Nov 2022 17:15:57 +0100 Subject: [PATCH 2/2] ci: migrating checkout action to v3 and upload action to v3.1.1 --- .github/workflows/ci.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 50c1ab05a..e12607add 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: - 'include' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Run clang-format check for C++ uses: HorstBaerbel/action-clang-format@master @@ -50,7 +50,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@master + uses: actions/checkout@v3 - name: Update diagram uses: githubocto/repo-visualizer@main @@ -121,7 +121,7 @@ jobs: } steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive @@ -226,13 +226,13 @@ jobs: cp -r tests/cpp temp/ - name: Upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3.1.1 with: name: ${{ matrix.config.artifact }} path: artifact - name: Upload temp artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3.1.1 with: name: temp-${{ matrix.config.artifact }} path: temp @@ -259,20 +259,20 @@ jobs: - { os: macos-latest, name: "MacOS Clang 12", artifact: "macos-clang-12", } steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Download artifact id: download - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3.0.1 with: name: ${{ matrix.config.artifact }} path: build - name: Download temp artifact id: download-artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3.0.1 with: name: temp-${{ matrix.config.artifact }} path: artifact @@ -310,13 +310,13 @@ jobs: needs: [build] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Download artifact id: download - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3.0.1 with: name: "ubuntu-clang-11-valgrind" path: build