diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..9b757947b5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,146 @@ +name: ci + +on: + push: + pull_request: + branches: + - '*' + +env: + TEST_TAG: tugraph/tugraph-ut:test + +# Issues TODO: +# 1. Seems GitHub limits the output passed among jobs up to 1MB, +# so we can't break down the entire workflow to multi-jobs. +# 2. For submodules in the repo inside the single job, the git binary in docker image +# should be upgrade to at least 2.18 in order to use actions/checkout@v3 +# inside docker instead of running ut and it via Dockerfile. +jobs: + ut_no_asan: + runs-on: ubuntu-latest + steps: + - name: Delete huge unnecessary tools folder + run: | + df -h + echo "Listing 100 largest packages" + dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100 + echo "Removing large packages" + sudo apt-get remove -y '^dotnet-.*' + sudo apt-get remove -y '^llvm-.*' + sudo apt-get remove -y 'php.*' + sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel + sudo apt-get autoremove -y + sudo apt-get clean + df -h + echo "Removing large directories" + rm -rf /usr/share/dotnet/ + rm -rf /opt/hostedtoolcache + df -h + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'true' + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + with: + buildkitd-flags: --debug + - name: Unit Test + uses: docker/build-push-action@v4 + with: + file: ci/images/github-ci-ubuntu-latest-Dockerfile + context: . + tags: ${{ env.TEST_TAG }} + build-args: | + BUILD_TYPE=no_asan + TEST_TYPE=ut + secrets: | + "CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }}" + - name: Check disk space + if: always() + run: df -h + + ut_asan: + runs-on: ubuntu-latest + steps: + - name: Delete huge unnecessary tools folder + run: | + df -h + echo "Listing 100 largest packages" + dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100 + echo "Removing large packages" + sudo apt-get remove -y '^dotnet-.*' + sudo apt-get remove -y '^llvm-.*' + sudo apt-get remove -y 'php.*' + sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel + sudo apt-get autoremove -y + sudo apt-get clean + df -h + echo "Removing large directories" + rm -rf /usr/share/dotnet/ + rm -rf /opt/hostedtoolcache + df -h + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'true' + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + with: + buildkitd-flags: --debug + - name: Unit Test + uses: docker/build-push-action@v4 + with: + file: ci/images/github-ci-ubuntu-latest-Dockerfile + context: . + tags: ${{ env.TEST_TAG }} + build-args: | + BUILD_TYPE=asan + TEST_TYPE=ut + secrets: | + "CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }}" + - name: Check disk space + if: always() + run: df -h + + it: + runs-on: ubuntu-latest + steps: + - name: Delete huge unnecessary tools folder + run: | + df -h + echo "Listing 100 largest packages" + dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100 + echo "Removing large packages" + sudo apt-get remove -y '^dotnet-.*' + sudo apt-get remove -y '^llvm-.*' + sudo apt-get remove -y 'php.*' + sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel + sudo apt-get autoremove -y + sudo apt-get clean + df -h + echo "Removing large directories" + rm -rf /usr/share/dotnet/ + rm -rf /opt/hostedtoolcache + df -h + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'true' + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + with: + buildkitd-flags: --debug + - name: Integration Test + uses: docker/build-push-action@v4 + with: + file: ci/images/github-ci-ubuntu-latest-Dockerfile + context: . + tags: ${{ env.TEST_TAG }} + build-args: | + BUILD_TYPE=no_asan + TEST_TYPE=it + secrets: | + "CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }}" + - name: Check disk space + if: always() + run: df -h diff --git a/.github/workflows/ci_asan.yml b/.github/workflows/ci_asan.yml deleted file mode 100644 index 95ada0e4ca..0000000000 --- a/.github/workflows/ci_asan.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: ci_asan - -on: - push: - pull_request: - branches: - - '*' - -env: - TEST_TAG: tugraph/tugraph-ut:test - -# Issues TODO: -# 1. Seems GitHub limits the output passed among jobs up to 1MB, -# so we can't break down the entire workflow to multi-jobs. -# 2. For submodules in the repo inside the single job, the git binary in docker image -# should be upgrade to at least 2.18 in order to use actions/checkout@v3 -# inside docker instead of running ut and it via Dockerfile. -jobs: - docker: - runs-on: ubuntu-latest - steps: - - name: Delete huge unnecessary tools folder - run: | - df -h - echo "Listing 100 largest packages" - dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100 - echo "Removing large packages" - sudo apt-get remove -y '^dotnet-.*' - sudo apt-get remove -y '^llvm-.*' - sudo apt-get remove -y 'php.*' - sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel - sudo apt-get autoremove -y - sudo apt-get clean - df -h - echo "Removing large directories" - rm -rf /usr/share/dotnet/ - rm -rf /opt/hostedtoolcache - df -h - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'true' - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - with: - buildkitd-flags: --debug - - name: Unit Test - uses: docker/build-push-action@v4 - with: - file: ci/gh-actions/ubuntu-latest/Dockerfile - context: . - tags: ${{ env.TEST_TAG }} - build-args: | - BUILD_TYPE=asan - TEST_TYPE=ut - secrets: | - "CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }}" - - name: Check disk space - if: always() - run: df -h diff --git a/.github/workflows/ci_it.yml b/.github/workflows/ci_it.yml deleted file mode 100644 index 6a97d359fc..0000000000 --- a/.github/workflows/ci_it.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: ci_it - -on: - push: - pull_request: - branches: - - '*' - -env: - TEST_TAG: tugraph/tugraph-ut:test - -# Issues TODO: -# 1. Seems GitHub limits the output passed among jobs up to 1MB, -# so we can't break down the entire workflow to multi-jobs. -# 2. For submodules in the repo inside the single job, the git binary in docker image -# should be upgrade to at least 2.18 in order to use actions/checkout@v3 -# inside docker instead of running ut and it via Dockerfile. -jobs: - docker: - runs-on: ubuntu-latest - steps: - - name: Delete huge unnecessary tools folder - run: | - df -h - echo "Listing 100 largest packages" - dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100 - echo "Removing large packages" - sudo apt-get remove -y '^dotnet-.*' - sudo apt-get remove -y '^llvm-.*' - sudo apt-get remove -y 'php.*' - sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel - sudo apt-get autoremove -y - sudo apt-get clean - df -h - echo "Removing large directories" - rm -rf /usr/share/dotnet/ - rm -rf /opt/hostedtoolcache - df -h - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'true' - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - with: - buildkitd-flags: --debug - - name: Integration Test - uses: docker/build-push-action@v4 - with: - file: ci/gh-actions/ubuntu-latest/Dockerfile - context: . - tags: ${{ env.TEST_TAG }} - build-args: | - BUILD_TYPE=no_asan - TEST_TYPE=it - secrets: | - "CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }}" - - name: Check disk space - if: always() - run: df -h diff --git a/.github/workflows/ci_ut.yml b/.github/workflows/ci_ut.yml deleted file mode 100644 index 4398c105e3..0000000000 --- a/.github/workflows/ci_ut.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: ci_ut - -on: - push: - pull_request: - branches: - - '*' - -env: - TEST_TAG: tugraph/tugraph-ut:test - -# Issues TODO: -# 1. Seems GitHub limits the output passed among jobs up to 1MB, -# so we can't break down the entire workflow to multi-jobs. -# 2. For submodules in the repo inside the single job, the git binary in docker image -# should be upgrade to at least 2.18 in order to use actions/checkout@v3 -# inside docker instead of running ut and it via Dockerfile. -jobs: - docker: - runs-on: ubuntu-latest - steps: - - name: Delete huge unnecessary tools folder - run: | - df -h - echo "Listing 100 largest packages" - dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100 - echo "Removing large packages" - sudo apt-get remove -y '^dotnet-.*' - sudo apt-get remove -y '^llvm-.*' - sudo apt-get remove -y 'php.*' - sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel - sudo apt-get autoremove -y - sudo apt-get clean - df -h - echo "Removing large directories" - rm -rf /usr/share/dotnet/ - rm -rf /opt/hostedtoolcache - df -h - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: 'true' - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - with: - buildkitd-flags: --debug - - name: Unit Test - uses: docker/build-push-action@v4 - with: - file: ci/gh-actions/ubuntu-latest/Dockerfile - context: . - tags: ${{ env.TEST_TAG }} - build-args: | - BUILD_TYPE=no_asan - TEST_TYPE=ut - secrets: | - "CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }}" - - name: Check disk space - if: always() - run: df -h diff --git a/ci/gh-actions/ubuntu-latest/Dockerfile b/ci/images/github-ci-ubuntu-latest-Dockerfile similarity index 100% rename from ci/gh-actions/ubuntu-latest/Dockerfile rename to ci/images/github-ci-ubuntu-latest-Dockerfile