From a56f87feda230c790638027ee3599b869946ec77 Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Thu, 26 Sep 2024 01:41:08 -0400 Subject: [PATCH 1/4] ci: build & push --- .gitea/workflows/push.yaml | 32 ++++++++++++++++++++++++++++++++ .gitignore | 3 ++- .gitmodules | 3 +++ JOJ3 | 1 + Makefile | 3 +++ 5 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/push.yaml create mode 100644 .gitmodules create mode 160000 JOJ3 diff --git a/.gitea/workflows/push.yaml b/.gitea/workflows/push.yaml new file mode 100644 index 0000000..48fa002 --- /dev/null +++ b/.gitea/workflows/push.yaml @@ -0,0 +1,32 @@ +--- +name: push +on: + push: + branches: + - actions +jobs: + build: + container: + image: focs.ji.sjtu.edu.cn:5000/gitea/runner-images:ubuntu-latest + steps: + - name: Check out repository code + uses: https://gitea.com/BoYanZh/checkout@focs + - name: Setup Go 1.23.1 + run: | + wget -q https://studygolang.com/dl/golang/go1.23.1.linux-amd64.tar.gz + rm -rf /usr/local/go + tar -C /usr/local -xzf go1.23.1.linux-amd64.tar.gz + rm -rf go1.23.1.linux-amd64.tar.gz + echo "PATH=$PATH:/usr/local/go/bin:/root/go/bin" >> $GITHUB_ENV + - name: Display Go version + run: go version + - name: Prepare + run: | + go env -w GO111MODULE=on + go env -w GOPROXY=https://goproxy.io,direct + - name: Build + run: make build + - name: Check images + run: docker ps -a + - name: Push + run: make push diff --git a/.gitignore b/.gitignore index 70a2b82..572fc75 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -/bin/joj3 +/bin/* +!/bin/joj3-teapot diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..ffcd5ea --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "JOJ3"] + path = JOJ3 + url = ssh://git@focs.ji.sjtu.edu.cn:2222/FOCS-dev/JOJ3.git diff --git a/JOJ3 b/JOJ3 new file mode 160000 index 0000000..1bb0ddd --- /dev/null +++ b/JOJ3 @@ -0,0 +1 @@ +Subproject commit 1bb0ddd253092895405d02e66ff089743735c941 diff --git a/Makefile b/Makefile index 94e0769..31e3ea5 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,9 @@ all: build build: + git submodule update --init --remote + $(MAKE) -C JOJ3 + cp JOJ3/build/* bin/ docker build -t focs.ji.sjtu.edu.cn:5000/gitea/runner-images:focs-ubuntu-latest-slim . push: -- 2.30.2 From 3d4cb0d568e3814b9d3929d6a81a1345f54ce85c Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Thu, 26 Sep 2024 01:53:44 -0400 Subject: [PATCH 2/4] ci: fix .ssh mount --- .gitea/workflows/push.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitea/workflows/push.yaml b/.gitea/workflows/push.yaml index 48fa002..a9e681d 100644 --- a/.gitea/workflows/push.yaml +++ b/.gitea/workflows/push.yaml @@ -8,6 +8,8 @@ jobs: build: container: image: focs.ji.sjtu.edu.cn:5000/gitea/runner-images:ubuntu-latest + volumes: + - /home/actions/.ssh:/root/.ssh steps: - name: Check out repository code uses: https://gitea.com/BoYanZh/checkout@focs @@ -24,6 +26,7 @@ jobs: run: | go env -w GO111MODULE=on go env -w GOPROXY=https://goproxy.io,direct + chown -R root:root /root/.ssh - name: Build run: make build - name: Check images -- 2.30.2 From dc6b99d243db07a163d5a7434ee9e3814a8afcb8 Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Thu, 26 Sep 2024 01:58:47 -0400 Subject: [PATCH 3/4] ci: remove docker syntax --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 625bda1..715a280 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,3 @@ -# syntax=docker/dockerfile:1 - FROM focs.ji.sjtu.edu.cn:5000/gitea/runner-images:ubuntu-latest-slim RUN apt-get update && \ -- 2.30.2 From bc7a5a6eec34b0db841ecb7541586a4f511cae07 Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Thu, 26 Sep 2024 02:03:17 -0400 Subject: [PATCH 4/4] ci: rename branch --- .gitea/workflows/push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/push.yaml b/.gitea/workflows/push.yaml index a9e681d..006680e 100644 --- a/.gitea/workflows/push.yaml +++ b/.gitea/workflows/push.yaml @@ -3,7 +3,7 @@ name: push on: push: branches: - - actions + - master jobs: build: container: -- 2.30.2