Skip to content

fix: safely parse mime charset parameters #872

fix: safely parse mime charset parameters

fix: safely parse mime charset parameters #872

Workflow file for this run

name: Go
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
build-macos-latest:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.26.1
- name: Build linux 386
run: CGO_ENABLED=0 GOOS=linux GOARCH=386 go build
- name: Build linux amd64
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build
- name: Build linux arm
run: CGO_ENABLED=0 GOOS=linux GOARCH=arm go build
- name: Build linux arm64
run: CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build
- name: Build linux loong64
run: CGO_ENABLED=0 GOOS=linux GOARCH=loong64 go build
- name: Build darwin amd64
run: CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build
- name: Build darwin arm64
run: CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build
- name: Build windows 386
run: CGO_ENABLED=0 GOOS=windows GOARCH=386 go build
- name: Build windows amd64
run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build
- name: Build windows arm64
run: CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build
- name: Run tests
run: go test -v ./...
- name: Check size of darwin amd64 binary
run: |
SIZE=$(stat -f%z g)
echo "Binary size is $SIZE bytes"
if [ $SIZE -gt 10000000 ]; then
echo "Binary size exceeds 10MB"
fi
build-macos-13:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.26.1
- name: Build linux 386
run: CGO_ENABLED=0 GOOS=linux GOARCH=386 go build
- name: Build linux amd64
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build
- name: Build linux arm
run: CGO_ENABLED=0 GOOS=linux GOARCH=arm go build
- name: Build linux arm64
run: CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build
- name: Build linux loong64
run: CGO_ENABLED=0 GOOS=linux GOARCH=loong64 go build
- name: Build darwin amd64
run: CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build
- name: Build darwin arm64
run: CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build
- name: Build windows 386
run: CGO_ENABLED=0 GOOS=windows GOARCH=386 go build
- name: Build windows amd64
run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build
- name: Build windows arm64
run: CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build
- name: Run tests
run: go test -v ./...
- name: Check size of darwin amd64 binary
run: |
SIZE=$(stat -f%z g)
echo "Binary size is $SIZE bytes"
if [ $SIZE -gt 10000000 ]; then
echo "Binary size exceeds 10MB"
fi
windows-latest:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.26.1
- name: Build
run: go build
- name: Check size of windows binary
shell: bash
run: |
SIZE=$(stat -c%s g.exe)
echo "Binary size is $SIZE bytes"
if [ $SIZE -gt 10000000 ]; then
echo "Binary size exceeds 10MB"
fi
ubuntu-latest-latest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.26.1
- name: Build linux 386
run: CGO_ENABLED=0 GOOS=linux GOARCH=386 go build
- name: Build linux amd64
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build
- name: Build linux arm
run: CGO_ENABLED=0 GOOS=linux GOARCH=arm go build
- name: Build linux arm64
run: CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build
- name: Build linux loong64
run: CGO_ENABLED=0 GOOS=linux GOARCH=loong64 go build
- name: Build windows 386
run: CGO_ENABLED=0 GOOS=windows GOARCH=386 go build
- name: Build windows amd64
run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build
- name: Build windows arm64
run: CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build
- name: Run tests
run: go test -v ./...
- name: Check size of linux binary
run: |
SIZE=$(stat -c%s g)
echo "Binary size is $SIZE bytes"
if [ $SIZE -gt 10000000 ]; then
echo "Binary size exceeds 10MB"
fi