From 9d69742fab12d12ca50b7f5d1b800cb88fc6ac7b Mon Sep 17 00:00:00 2001 From: zakuro Date: Sat, 30 Sep 2023 09:56:11 +0900 Subject: [PATCH] ci: move setup code to Makefile --- .github/workflows/Makefile | 8 ++++++++ .github/workflows/ci.yaml | 12 ++---------- 2 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/Makefile diff --git a/.github/workflows/Makefile b/.github/workflows/Makefile new file mode 100644 index 0000000..abe79fa --- /dev/null +++ b/.github/workflows/Makefile @@ -0,0 +1,8 @@ +.PHONY: setup setup-v + +setup: setup-v + +setup-v: + git clone https://github.com/vlang/v /opt/v --depth 1 + cd /opt/v && make + /opt/v/v symlink diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 47fdc18..8a93e4e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,20 +12,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - run: | - git clone https://github.com/vlang/v /opt/v --depth 1 - cd /opt/v - make - ./v symlink + - run: make -f ./.github/workflows/Makefile setup - run: make build - run: make run args=-help test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - run: | - git clone https://github.com/vlang/v /opt/v --depth 1 - cd /opt/v - make - ./v symlink + - run: make -f ./.github/workflows/Makefile setup - run: make test