From 3bfe238552f19c5c8459ef3ef2827096dc62e2d1 Mon Sep 17 00:00:00 2001 From: Certseeds <51754303+Certseeds@users.noreply.github.com> Date: Sun, 26 Jul 2020 19:17:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=8A=A8=E6=B5=8B?= =?UTF-8?q?=E8=AF=95action.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 4 +-- .github/workflows/test.yml | 63 +++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6f920eda..fea98aed 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,8 +55,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: 0.0.6.3 - release_name: 0.0.6.3 + tag_name: 0.0.6.4 + release_name: 0.0.6.4 draft: false prerelease: false diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..b8da5db7 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,63 @@ +# @Github: https://github.com/Certseeds/CS203_DSAA_template +# @Organization: SUSTech +# @Author: nanoseeds +# @Date: 2020-07-26 19:08:22 +# @LastEditors: nanoseeds +# @LastEditTime: 2020-07-26 19:08:34 + +name: test + +# 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 ] + pull_request: + branches: [ master ] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: checkout code + uses: actions/checkout@v2 + + # ensure the path and files of project + - name: ensure the path and files of project + run: | + echo Hello, world! + echo $(pwd) + ls -la + + - name: Setup cmake + uses: jwlawson/actions-setup-cmake@v1.3 + with: + cmake-version: '3.10.2' + + - name: Use cmake + run: cmake --version + + - name: mkdir for build + run: mkdir ./cmake_build + + - name: build the project + working-directory: ./cmake_build + run: | + cmake .. + make + + - name: run the test + working-directory: ./cmake_build + run: ./CS203_DSAA_template_test + + - name: Run a multi-line script + run: | + echo $(pwd) + ls -la \ No newline at end of file