Bump golang from 1.23.4-bookworm to 1.23.5-bookworm #237
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Test | |
"on": | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- 'LICENSE' | |
- 'README.*' | |
pull_request: | |
paths-ignore: | |
- 'LICENSE' | |
- 'README.*' | |
jobs: | |
test-go: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: | |
- '1.23' | |
- '1.x' | |
defaults: | |
run: | |
working-directory: tools/replacetool | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- run: go build | |
- run: go test -cover ./... | |
test-script: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
desc: | |
- 'test package' | |
- > | |
sample package1 | |
sample package2 | |
sample package3 | |
- | | |
sample package1 | |
sample package2 | |
sample package3 | |
- '' | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
mkdir -p .debpkg/usr/bin | |
mkdir -p .debpkg/usr/lib/testbin | |
echo -e "echo hello" > .debpkg/usr/bin/testbin | |
echo -e "echo hello2" > .debpkg/usr/bin/testbin2 | |
echo -e "a=1" > .debpkg/usr/lib/testbin/testbin.conf | |
chmod +x .debpkg/usr/bin/* | |
- uses: ./ | |
with: | |
package: testbin | |
package_root: .debpkg | |
maintainer: jiro4989 | |
version: 'v1.0.0' | |
arch: 'amd64' | |
desc: "${{ matrix.desc }}" | |
if: matrix.desc != '' | |
- uses: ./ | |
with: | |
package: testbin | |
package_root: .debpkg | |
maintainer: jiro4989 | |
version: 'v1.0.0' | |
arch: 'amd64' | |
if: matrix.desc == '' | |
- name: install deb package | |
run: sudo dpkg -i *.deb | |
- name: Print deb package information | |
run: dpkg -I ./*.deb | |
- name: check files | |
run: | | |
which testbin | |
testbin | |
which testbin2 | |
testbin2 | |
find /usr/lib/testbin/ | |
cat /usr/lib/testbin/testbin.conf | |
- name: Print installed deb package size | |
run: > | |
dpkg-query -W -f='${Installed-Size}\t${Package}\n' | | |
sort -nr | | |
grep testbin | |
test-github-ref-version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
mkdir -p .debpkg/usr/bin | |
mkdir -p .debpkg/usr/lib/testbin | |
echo -e "echo hello" > .debpkg/usr/bin/testbin | |
echo -e "echo hello2" > .debpkg/usr/bin/testbin2 | |
echo -e "a=1" > .debpkg/usr/lib/testbin/testbin.conf | |
chmod +x .debpkg/usr/bin/* | |
- uses: ./ | |
with: | |
package: testbin | |
package_root: .debpkg | |
maintainer: jiro4989 | |
version: 'refs/tags/v1.0.0' | |
arch: 'amd64' | |
desc: 'test package' | |
id: build | |
- name: install deb package | |
run: sudo dpkg -i *.deb | |
- name: check files | |
run: | | |
which testbin | |
testbin | |
which testbin2 | |
testbin2 | |
find /usr/lib/testbin/ | |
cat /usr/lib/testbin/testbin.conf | |
- name: Test file_name | |
run: test ${{ steps.build.outputs.file_name }} = 'testbin_1.0.0_amd64.deb' | |
test-nim-package: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: jiro4989/setup-nim-action@v2 | |
- run: | | |
git clone https://github.com/jiro4989/nimjson app | |
( | |
cd app | |
nimble build -Y | |
cp bin/nimjson ../ | |
) | |
rm -rf app | |
mkdir -p .debpkg/usr/bin | |
mv nimjson .debpkg/usr/bin/ | |
- uses: ./ | |
with: | |
package: nimjson | |
package_root: .debpkg | |
maintainer: jiro4989 | |
version: 'v1.0.0' | |
arch: 'amd64' | |
desc: 'test package' | |
- run: sudo dpkg -i *.deb | |
- run: which nimjson | |
- run: nimjson -h | |
- run: dpkg -s nimjson | |
test-postinst: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
mkdir -p .debpkg/usr/bin | |
mkdir -p .debpkg/usr/lib/testbin | |
echo -e "echo hello" > .debpkg/usr/bin/testbin | |
echo -e "echo hello2" > .debpkg/usr/bin/testbin2 | |
echo -e "a=1" > .debpkg/usr/lib/testbin/testbin.conf | |
mkdir -p .debpkg/DEBIAN | |
cat << E > .debpkg/DEBIAN/postinst | |
#!/bin/bash | |
set -eu | |
echo postinst $@ | |
E | |
chmod +x .debpkg/DEBIAN/postinst | |
chmod +x .debpkg/usr/bin/* | |
- uses: ./ | |
with: | |
package: testbin | |
package_root: .debpkg | |
maintainer: jiro4989 | |
version: 'v1.0.0' | |
arch: 'amd64' | |
desc: 'test package' | |
- name: install deb package | |
run: sudo dpkg -i *.deb | |
- name: check files | |
run: | | |
which testbin | |
testbin | |
which testbin2 | |
testbin2 | |
find /usr/lib/testbin/ | |
cat /usr/lib/testbin/testbin.conf | |
test-depends: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: jiro4989/setup-nim-action@v2 | |
- run: | | |
git clone https://github.com/jiro4989/nimjson app | |
( | |
cd app | |
nimble build -Y | |
cp bin/nimjson ../ | |
) | |
rm -rf app | |
mkdir -p .debpkg/usr/bin | |
mv nimjson .debpkg/usr/bin/ | |
- uses: ./ | |
with: | |
package: nimjson | |
package_root: .debpkg | |
maintainer: jiro4989 | |
version: 'v1.0.0' | |
depends: 'libc6 (>= 2.2.1), git' | |
arch: 'amd64' | |
desc: 'test package' | |
keep_ownership: true | |
homepage: 'https://github.com/jiro4989/build-deb-action' | |
section: 'unknown' | |
id: build | |
- name: Install deb package | |
run: sudo dpkg -i ${{ steps.build.outputs.file_name }} | |
- name: Print deb package information | |
run: dpkg -I ./*.deb | |
- name: Print installed command path | |
run: which nimjson | |
- name: Print command help message | |
run: nimjson -h | |
- name: Print installed deb package information | |
run: dpkg -s nimjson | |
- name: Print installed deb package size | |
run: > | |
dpkg-query -W -f='${Installed-Size}\t${Package}\n' | | |
sort -nr | | |
grep nimjson | |
test-debian: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
image: | |
- 'ubuntu:22.04' | |
- 'ubuntu:24.04' | |
- 'debian:9' | |
- 'debian:stable' | |
compress_type: | |
- 'gzip' | |
- 'xz' | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
mkdir -p .debpkg/usr/bin | |
mkdir -p .debpkg/usr/lib/testbin | |
echo -e "echo hello" > .debpkg/usr/bin/testbin | |
echo -e "echo hello2" > .debpkg/usr/bin/testbin2 | |
echo -e "a=1" > .debpkg/usr/lib/testbin/testbin.conf | |
chmod +x .debpkg/usr/bin/* | |
- uses: ./ | |
with: | |
package: testbin | |
package_root: .debpkg | |
maintainer: jiro4989 | |
version: 'v1.0.0' | |
arch: 'amd64' | |
compress_type: ${{ matrix.compress_type }} | |
- name: Test installing on docker | |
run: docker run --rm -v $PWD:/work -w /work -t ${{ matrix.image }} dpkg -i ./*.deb |