commit
705830d1df
9
.github/dependabot.yml
vendored
Normal file
9
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
# Set update schedule for GitHub Actions
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
# Check for updates to GitHub Actions every weekday
|
||||
interval: "daily"
|
62
.github/release.yml
vendored
Normal file
62
.github/release.yml
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
name: "tagged-release"
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: build ${{ matrix.arch_name }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Disable: unsupported system: android-arm, android-arm64, android-x86, android-x86_64, web-wasm,
|
||||
# Disable: missing header in linux(GCC): windows-static-x64, windows-static-x64-posix, windows-static-x86, windows-shared-x64, windows-shared-x64-posix, windows-shared-x86,
|
||||
arch_name: [linux-arm64, linux-arm64-musl, linux-armv5, linux-armv5-musl, linux-armv6, linux-armv6-musl, linux-armv7, linux-armv7a, linux-armv7l-musl, linux-x64-clang, linux-s390x, linux-x64, linux-x86, linux-mips, linux-ppc64le, manylinux1-x64, manylinux1-x86, manylinux2010-x64, manylinux2010-x86, manylinux2014-x64, manylinux2014-x86, manylinux2014-aarch64, linux-riscv64, linux-riscv32]
|
||||
steps:
|
||||
- name: "📥 Checkout Code"
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
fetch-depth: 0
|
||||
- name: "🛠️ cmake"
|
||||
run: ./builder/cmake.sh ${{ matrix.arch_name }}:latest -DCMAKE_BUILD_TYPE=Release
|
||||
- name: "✅ checksum"
|
||||
run: cd build-${{ matrix.arch_name }} && find . -maxdepth 1 -name "tmux-mem-cpu-load*" | xargs sha256sum > checksum.sha256
|
||||
- name: "🗜️ compress"
|
||||
run: cd build-${{ matrix.arch_name }} && find . -maxdepth 1 -name "tmux-mem-cpu-load*" -o -name "*.sha256" | XZ_OPT=-e9 tar -cJf tmux-mem-cpu-load-${{ matrix.arch_name }}.tar.xz -T - && mv tmux-mem-cpu-load-${{ matrix.arch_name }}.tar.xz ..
|
||||
- name: "💾 save binaries"
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: bin-artifact
|
||||
path: tmux-mem-cpu-load-${{ matrix.arch_name }}.tar.xz
|
||||
retention-days: 1
|
||||
release:
|
||||
name: release
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: "📥 Checkout Code"
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
fetch-depth: 0
|
||||
- name: get artifact
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: bin-artifact
|
||||
path: .
|
||||
- name: "✅ checksum"
|
||||
run: find . -maxdepth 1 -name "*.tar.xz" | xargs sha256sum > checksum_all.sha256
|
||||
- uses: "marvinpinto/action-automatic-releases@latest"
|
||||
name: "📤 upload to github"
|
||||
with:
|
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
prerelease: false
|
||||
files: |
|
||||
LICENSE
|
||||
*.tar.xz
|
||||
*.sha256
|
22
.github/workflows/expired.yml
vendored
Normal file
22
.github/workflows/expired.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
name: 'Close stale issues and PRs'
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 */8 * * *'
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v3
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
exempt-issue-milestones: 'future,alpha,beta,release'
|
||||
exempt-pr-milestones: 'bugfix,improvement'
|
||||
exempt-all-pr-assignees: true
|
||||
stale-issue-message: 'This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 15 days.'
|
||||
stale-pr-message: 'This PR is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 15 days.'
|
||||
close-issue-message: 'This issue was closed because it has been stalled for 30 days with no activity.'
|
||||
close-pr-message: 'This PR was closed because it has been stalled for 30 days with no activity.'
|
||||
days-before-issue-stale: 120
|
||||
days-before-pr-stale: 120
|
||||
days-before-issue-close: 30
|
||||
days-before-pr-close: 30
|
33
.github/workflows/main.yml
vendored
Normal file
33
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
name: tmux-mem-cpu-load
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '*'
|
||||
paths-ignore:
|
||||
- '**/README.md'
|
||||
- '**/README.rst'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
image:
|
||||
name: build ${{ matrix.arch_name }} ${{ matrix.build_type }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Disable: unsupported system: android-arm, android-arm64, android-x86, android-x86_64, web-wasm,
|
||||
# Disable: missing header in linux(GCC): windows-static-x64, windows-static-x64-posix, windows-static-x86, windows-shared-x64, windows-shared-x64-posix, windows-shared-x86,
|
||||
arch_name: [linux-arm64, linux-arm64-musl, linux-armv5, linux-armv5-musl, linux-armv6, linux-armv6-musl, linux-armv7, linux-armv7a, linux-armv7l-musl, linux-x64-clang, linux-s390x, linux-x64, linux-x86, linux-mips, linux-ppc64le, manylinux1-x64, manylinux1-x86, manylinux2010-x64, manylinux2010-x86, manylinux2014-x64, manylinux2014-x86, manylinux2014-aarch64, linux-riscv64, linux-riscv32]
|
||||
build_type: [Release, Debug]
|
||||
steps:
|
||||
- name: "📥 Checkout Code"
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
fetch-depth: 0
|
||||
- name: "🛠️ build"
|
||||
run: ./builder/cmake.sh ${{ matrix.arch_name }}:latest -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -57,3 +57,5 @@ Thumbs.db
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
dockcross-*
|
||||
build-*
|
||||
|
@ -174,7 +174,7 @@ Contributions from:
|
||||
* Compilenix <Compilenix@compilenix.org>
|
||||
* jodavies <jodavies1010@gmail.com>
|
||||
* `@nhdaly`_ (Nathan Daly) <nhdaly@gmail.com>
|
||||
|
||||
* bensuperpc <bensuperpc@gmail.com>
|
||||
|
||||
.. _tmux: http://tmux.sourceforge.net/
|
||||
.. _CMake: http://www.cmake.org
|
||||
|
6
builder/cmake.sh
Executable file
6
builder/cmake.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
source $(dirname "$0")/functions/cmake_fn.sh
|
||||
|
||||
cmake_build $@
|
11
builder/cmake_all.sh
Executable file
11
builder/cmake_all.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
curl https://raw.githubusercontent.com/dockcross/dockcross/master/Makefile -o dockcross-Makefile
|
||||
make -f dockcross-Makefile display_images
|
||||
|
||||
source $(dirname "$0")/functions/cmake_fn.sh
|
||||
|
||||
for image in $(make -f dockcross-Makefile display_images); do
|
||||
cmake_build $image $@
|
||||
done
|
19
builder/functions/cmake_fn.sh
Executable file
19
builder/functions/cmake_fn.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
cmake_build () {
|
||||
local image=$1
|
||||
local build_file=build-${image%:*}
|
||||
shift 1
|
||||
local cmake_arg=$@
|
||||
echo "cmake arg: $cmake_arg"
|
||||
|
||||
echo "Pulling dockcross/$image"
|
||||
docker pull dockcross/$image
|
||||
echo "Make script dockcross-$image"
|
||||
docker run --rm dockcross/$image > ./dockcross-$image
|
||||
chmod +x ./dockcross-$image
|
||||
echo "Build $build_file"
|
||||
./dockcross-$image cmake -B$build_file -H. -GNinja $cmake_arg
|
||||
./dockcross-$image ninja -C$build_file
|
||||
}
|
15
builder/functions/makefile_fn.sh
Executable file
15
builder/functions/makefile_fn.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
makefile_build () {
|
||||
local image=$1
|
||||
shift 1
|
||||
|
||||
echo "Pulling dockcross/$image"
|
||||
docker pull dockcross/$image
|
||||
echo "Make script dockcross-$image"
|
||||
docker run --rm dockcross/$image > ./dockcross-$image
|
||||
chmod +x ./dockcross-$image
|
||||
echo "Build..."
|
||||
./dockcross-$image bash -c 'make CXX=$CXX CC=$CC AR=$AR AS=$AS CPP=$CPP FC=$FC'
|
||||
}
|
6
builder/makefile.sh
Executable file
6
builder/makefile.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
source $(dirname "$0")/functions/makefile_fn.sh
|
||||
|
||||
makefile_build $@
|
11
builder/makefile_all.sh
Executable file
11
builder/makefile_all.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
curl https://raw.githubusercontent.com/dockcross/dockcross/master/Makefile -o dockcross-Makefile
|
||||
make -f dockcross-Makefile display_images
|
||||
|
||||
source $(dirname "$0")/functions/makefile_fn.sh
|
||||
|
||||
for image in $(make -f dockcross-Makefile display_images); do
|
||||
makefile_build $image $@
|
||||
done
|
Loading…
Reference in New Issue
Block a user