Skip to content

Commit

Permalink
feat: support ubuntu 20.04
Browse files Browse the repository at this point in the history
  • Loading branch information
maxime1907 committed Sep 25, 2022
1 parent 3e3ff8a commit aa82d2c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
29 changes: 20 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, windows-2019, macos-10.15]
sourcemod-version: [1.10-dev]
os: [ubuntu-20.04, windows-2019, macos-10.15]
sourcemod-version: [1.11-dev]
include:
- os: ubuntu-18.04
- os: ubuntu-20.04
target-archs: x86,x86_64

- os: windows-2019
Expand Down Expand Up @@ -63,8 +63,7 @@ jobs:
run: |
mkdir build && cd build
perl ../curl/lib/mk-ca-bundle.pl
python ../configure.py --enable-optimize --targets=${{ matrix.target-archs }} \
${{ github.ref == 'refs/heads/main' && '--breakpad-dump --symbol-files' || '' }}
python ../configure.py --enable-optimize --targets=${{ matrix.target-archs }}
ambuild
- name: Upload artifact
Expand All @@ -87,14 +86,26 @@ jobs:
- name: Package
run: |
version=`echo $GITHUB_REF | sed "s/refs\/tags\///"`
7z a sm-ripext-${version}-linux.zip ./Linux/*
7z a sm-ripext-${version}-mac.zip ./macOS/*
7z a sm-ripext-${version}-windows.zip ./Windows/*
if [ -d "./Linux/" ]; then
cd ./Linux/
tar -czf ../${{ github.event.repository.name }}-${version}-linux.tar.gz -T <(\ls -1)
cd -
fi
if [ -d "./macOS/" ]; then
cd ./macOS/
tar -czf ../${{ github.event.repository.name }}-${version}-mac.tar.gz -T <(\ls -1)
cd -
fi
if [ -d "./Windows/" ]; then
cd ./Windows/
tar -czf ../${{ github.event.repository.name }}-${version}-windows.tar.gz -T <(\ls -1)
cd -
fi
- name: Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: '*.zip'
file: '*.tar.gz'
tag: ${{ github.ref }}
file_glob: true
2 changes: 1 addition & 1 deletion httpclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ struct curl_slist *HTTPClient::BuildHeaders(const char *acceptTypes, const char

for (HTTPHeaderMap::iterator iter = this->headers.iter(); !iter.empty(); iter.next())
{
snprintf(header, sizeof(header), "%s: %s", iter->key.chars(), iter->value.c_str());
snprintf(header, sizeof(header), "%s: %s", iter->key.c_str(), iter->value.c_str());
headers = curl_slist_append(headers, header);
}

Expand Down
2 changes: 1 addition & 1 deletion httprequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ struct curl_slist *HTTPRequest::BuildHeaders()

for (HTTPHeaderMap::iterator iter = this->headers.iter(); !iter.empty(); iter.next())
{
snprintf(header, sizeof(header), "%s: %s", iter->key.chars(), iter->value.c_str());
snprintf(header, sizeof(header), "%s: %s", iter->key.c_str(), iter->value.c_str());
headers = curl_slist_append(headers, header);
}

Expand Down

0 comments on commit aa82d2c

Please sign in to comment.