WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

GHA: fix shellcheck SC2046 #104

GHA: fix shellcheck SC2046

GHA: fix shellcheck SC2046 #104

Workflow file for this run

# Copyright (C) Daniel Stenberg, <[email protected]>, et al.
#
# SPDX-License-Identifier: curl
name: 'Build'
'on':
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
permissions: {}
jobs:
ubuntu:
name: 'Linux'
runs-on: ubuntu-latest
strategy:
matrix:
build:
- name: 'default'
install_packages: valgrind
test: test-memory
- name: 'clang sanitizers'
install_packages: clang
test: test
CC: clang
CFLAGS: -fsanitize=address,undefined,signed-integer-overflow -Wformat -Werror=format-security -Werror=array-bounds -g
LDFLAGS: -fsanitize=address,undefined,signed-integer-overflow -g
steps:
- name: 'install prereqs'
env:
MATRIX_PACKAGES: ${{ matrix.build.install_packages }}
run: |
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get -o Dpkg::Use-Pty=0 update
sudo rm -f /var/lib/man-db/auto-update
sudo apt-get -o Dpkg::Use-Pty=0 install \
libcurl4-openssl-dev ${MATRIX_PACKAGES}
- uses: actions/checkout@v5
with:
persist-credentials: false
- name: 'Makefile make'
env:
CC: ${{ matrix.build.CC || 'cc' }}
CFLAGS: ${{ matrix.build.CFLAGS }}
LDFLAGS: ${{ matrix.build.LDFLAGS }}
run: make
- name: 'Makefile sanity test'
run: ./trurl -v
- name: 'Makefile test'
if: ${{ matrix.build.test != 'test-memory' }}
env:
MATRIX_TEST_TARGET: ${{ matrix.build.test }}
run: make ${MATRIX_TEST_TARGET}
- name: 'cmake configure'
run: cmake -B bld -G Ninja -DCMAKE_INSTALL_PREFIX="$HOME"/trurl-install -DTRURL_COMPLETION_ZSH=ON -DTRURL_WERROR=ON
- name: 'cmake build'
run: cmake --build bld
- name: 'cmake install'
run: cmake --install bld
- name: 'cmake sanity test'
run: bld/trurl -v
- name: 'cmake test'
env:
MATRIX_TEST_TARGET: ${{ matrix.build.test }}
run: cmake --build bld --target trurl-"${MATRIX_TEST_TARGET}"
cygwin:
name: 'Cygwin'
runs-on: windows-2022
defaults:
run:
shell: D:\cygwin\bin\bash.exe '{0}'
env:
SHELLOPTS: 'igncr'
steps:
- uses: cygwin/cygwin-install-action@f2009323764960f80959895c7bc3bb30210afe4d # v6
with:
site: https://mirrors.kernel.org/sourceware/cygwin/
work-vol: 'D:'
packages: gcc-core make cmake libcurl-devel python3
- uses: actions/checkout@v5
with:
persist-credentials: false
- name: 'Makefile make'
run: |
PATH=/usr/bin
make
- name: 'Makefile sanity test'
run: |
PATH=/usr/bin
./trurl -v
- name: 'Makefile test'
run: |
PATH=/usr/bin
make test
- name: 'cmake configure'
run: |
PATH=/usr/bin
cmake -B bld -DCMAKE_INSTALL_PREFIX="$HOME"/trurl-install -DTRURL_COMPLETION_ZSH=ON -DTRURL_WERROR=ON
- name: 'cmake build'
run: |
PATH=/usr/bin
cmake --build bld
- name: 'cmake configure log'
if: ${{ !cancelled() }}
run: |
PATH=/usr/bin
cat bld/CMakeFiles/CMake*.yaml 2>/dev/null || true
- name: 'cmake install'
run: |
PATH=/usr/bin
cmake --install bld
- name: 'cmake sanity test'
run: |
PATH=/usr/bin
bld/trurl -v
- name: 'cmake test'
run: |
PATH=/usr/bin
cmake --build bld --target trurl-test
macos:
name: 'macOS'
runs-on: macos-latest
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- name: 'Makefile make'
run: make
- name: 'Makefile sanity test'
run: ./trurl -v
- name: 'Makefile test'
run: make test
- name: 'cmake configure'
run: cmake -B bld -G Ninja -DCMAKE_INSTALL_PREFIX="$HOME"/trurl-install -DTRURL_COMPLETION_ZSH=ON -DTRURL_WERROR=ON
- name: 'cmake build'
run: cmake --build bld
- name: 'cmake install'
run: cmake --install bld
- name: 'cmake sanity test'
run: bld/trurl -v
- name: 'cmake test'
run: cmake --build bld --target trurl-test
windows:
name: 'Windows'
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- name: 'install prereqs'
run: |
mkdir curl
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 240 --retry 3 --retry-connrefused \
--location --proto-redir =https 'https://curl.se/windows/latest.cgi?p=win64-mingw.tar.xz' | tar --strip-components=1 -xJ --directory=curl
- name: 'cmake configure'
run: cmake -B bld -DCMAKE_BUILD_TYPE=Debug -DCURL_INCLUDE_DIR="$PWD"/curl/include -DCURL_LIBRARY="$PWD"/curl/lib/libcurl.dll.a -DTRURL_WERROR=ON
- name: 'cmake build'
run: cmake --build bld --verbose
- name: 'cmake configure log'
if: ${{ !cancelled() }}
run: cat bld/CMakeFiles/CMake*.yaml 2>/dev/null || true
- name: 'cmake sanity test'
run: |
PATH="$PWD/curl/bin:$PATH"
bld/Debug/trurl -v
- name: 'cmake test'
run: |
PATH="$PWD/curl/bin:$PATH"
cmake --build bld --target trurl-test