Skip to content

test with windows-ci #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/actions/setup-caddy/action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
name: Setup Caddy server
inputs:
arch:
default: 'LINUX_X64'
required: true
description: "Set LINUX_X64 or WINDOWS (which are job names of the push.yml workflows)"
runs:
using: composite
steps:
- shell: bash
if: inputs.arch == 'LINUX_X64'
env:
GH_TOKEN: ${{ github.token }}
run: |
Expand All @@ -11,3 +17,13 @@ runs:
sudo chmod +x /usr/bin/caddy
sudo caddy start --config ext/curl/tests/Caddyfile
continue-on-error: true
- shell: pwsh
if: inputs.arch == 'WINDOWS'
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release -R caddyserver/caddy download --pattern 'caddy_*_windows_amd64.zip' --output caddy.zip
Expand-Archive -Path caddy.zip -DestinationPath ./build/caddy -Force
./build/caddy/caddy.exe trust
./build/caddy/caddy.exe start --config ext/curl/tests/Caddyfile
continue-on-error: true
6 changes: 6 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ jobs:
uses: ./.github/actions/setup-mssql
- name: Setup Caddy server
uses: ./.github/actions/setup-caddy
with:
arch: LINUX_X64
- name: ccache
uses: hendrikmuhs/[email protected]
with:
Expand Down Expand Up @@ -254,6 +256,10 @@ jobs:
run: git config --global core.autocrlf false && git config --global core.eol lf
- name: git checkout
uses: actions/checkout@v4
- name: Setup Caddy server
uses: ./.github/actions/setup-caddy
with:
arch: WINDOWS
- name: Setup
uses: ./.github/actions/setup-windows
- name: Build
Expand Down
4 changes: 2 additions & 2 deletions ext/curl/tests/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ respond /serverpush/pushed "pushed response"
push /serverpush /serverpush/pushed

route /show_upload_size {
templates
respond `Content-length: ={{.Req.Header.Get "Content-length"}}=`
templates
respond `Content-length: ={{.Req.Header.Get "Content-length"}}=`
}

basic_auth /http-basic-auth {
Expand Down
Loading