Skip to content

Commit

Permalink
refactor ci
Browse files Browse the repository at this point in the history
  • Loading branch information
jiacai2050 committed Aug 7, 2024
1 parent c18d706 commit 8d85e01
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 24 deletions.
8 changes: 8 additions & 0 deletions .github/server.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

set -Eeuo pipefail

SERVER=/tmp/echo-server
go build -o ${SERVER} server/main.go
${SERVER} &
sleep 10
10 changes: 2 additions & 8 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ jobs:
make test
- name: Run examples
run: |
SERVER=/tmp/echo-server
go build -o ${SERVER} server/main.go
${SERVER} &
sleep 10
./.github/server.sh
make run
- name: Install deps
if: matrix.os == 'ubuntu-latest'
Expand Down Expand Up @@ -83,10 +80,7 @@ jobs:
make test
- name: Run examples
run: |
SERVER=/tmp/echo-server
go build -o ${SERVER} server/main.go
${SERVER} &
sleep 10
./.github/server.sh
make run
- name: Install deps
if: matrix.os == 'ubuntu-latest'
Expand Down
12 changes: 6 additions & 6 deletions .woodpecker/ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
steps:
- name: zig
image: ziglings/ziglang:latest
pull: true
image: ghcr.io/jiacai2050/playground:zig-20240807-bd9e04ba
commands:
- zig version
- zig fmt --check .
- zig build run-basic -freference-trace
- zig build run-advanced -freference-trace
- zig build run-multi -freference-trace
- asdf plugin add golang https://github.com/asdf-community/asdf-golang.git
- asdf install golang latest && asdf global golang latest
- ./.github/server.sh
- make test
- make run

when:
- event: [push, cron]
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@

ARGS = ${ZIG_ARGS}

prepare:
./libs/update.sh

clean:
rm -rf zig-cache zig-out

Expand All @@ -16,7 +13,10 @@ run:
zig build run-multi -freference-trace $(ARGS)
zig build run-header -freference-trace $(ARGS)

test:
lint:
zig fmt --check .

test: lint
zig build test $(ARGS)

docs:
Expand Down
8 changes: 2 additions & 6 deletions README.org
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#+TITLE: zig-curl
#+DATE: 2023-09-16T23:16:15+0800
#+LASTMOD: 2024-05-12T13:20:36+0800
#+LASTMOD: 2024-08-07T23:14:03+0800
#+OPTIONS: toc:nil num:nil
#+STARTUP: content

[[https://img.shields.io/badge/zig%20version-0.12.0-blue.svg]]
[[https://img.shields.io/badge/zig%20version-0.13.0-blue.svg]]
[[https://img.shields.io/badge/zig%20version-master-blue.svg]]
[[https://github.com/jiacai2050/zig-curl/actions/workflows/CI.yml][https://github.com/jiacai2050/zig-curl/actions/workflows/CI.yml/badge.svg]]
[[https://ci.codeberg.org/repos/13257][https://ci.codeberg.org/api/badges/13257/status.svg]]
Expand Down Expand Up @@ -64,9 +64,5 @@ exe.linkSystemLibrary("curl");
exe.linkLibC();
#+end_src

* Roadmap

- [x] Currently only easy API is supported, support [[https://curl.se/libcurl/c/libcurl-multi.html][multi API]].

* License
[[file:LICENSE][MIT]]

0 comments on commit 8d85e01

Please sign in to comment.