Skip to content

Commit

Permalink
optimized
Browse files Browse the repository at this point in the history
Signed-off-by: leleliu008 <leleliu008@gmail.com>
  • Loading branch information
leleliu008 committed Mar 17, 2024
1 parent 61c3132 commit c9ea4ab
Show file tree
Hide file tree
Showing 2 changed files with 138 additions and 2 deletions.
137 changes: 137 additions & 0 deletions .github/workflows/macos-brew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,143 @@ jobs:
end
EOF
- run: brew info ppkg
- run: brew install ppkg -v

- run: ppkg

- run: ppkg --help
- run: ppkg -h

- run: ppkg --version
- run: ppkg -V

- run: ppkg env
- run: ppkg env -v

- run: ppkg buildinfo
- run: ppkg sysinfo

- run: ppkg setup -v

- run: ppkg integrate zsh
- run: ppkg integrate zsh -v

- run: ppkg update

- run: ppkg search lib
- run: ppkg search zip

- run: ppkg info-available libzip
- run: ppkg info-available libzip --yaml
- run: ppkg info-available libzip --json
- run: ppkg info-available libzip summary
- run: ppkg info-available libzip version
- run: ppkg info-available libzip license
- run: ppkg info-available libzip web-url
- run: ppkg info-available libzip src-url
- run: ppkg info-available libzip src-sha

- run: ppkg depends libzip
- run: ppkg depends libzip -t dot
- run: ppkg depends libzip -t box

- run: ppkg fetch gzip
- run: ppkg fetch gsed -v

- run: ppkg install libzip

- run: ppkg tree libzip

- run: ppkg info-installed libzip --prefix
- run: ppkg info-installed libzip --files
- run: ppkg info-installed libzip --json
- run: ppkg info-installed libzip --yaml
- run: ppkg info-installed libzip builtat
- run: ppkg info-installed libzip builtat-iso-8601
- run: ppkg info-installed libzip builtat-rfc-3339
- run: ppkg info-installed libzip version

- run: ppkg pack libzip
- run: ppkg pack libzip -t tar.gz
- run: ppkg pack libzip -t tar.lz
- run: ppkg pack libzip -t tar.xz
- run: ppkg pack libzip -t tar.bz2
- run: ppkg pack libzip -t zip

- run: |
printf '%s\n' 'version: 1000' >> ~/.ppkg/repos.d/official-core/formula/libzip.yml
- run: ppkg ls-available
- run: ppkg ls-installed
- run: ppkg ls-outdated

- run: ppkg is-available libzip
- run: ppkg is-installed libzip
- run: ppkg is-outdated libzip

- run: ppkg upgrade libzip
- run: ppkg reinstall libzip
- run: ppkg uninstall libzip

- run: ppkg formula-repo-list
- run: ppkg formula-repo-add my_repo https://github.com/leleliu008/ppkg-formula-repository-official-core
- run: ppkg formula-repo-del my_repo

- run: ppkg cleanup

#- run: ppkg upgrade-self

brew-sanitizer:
strategy:
fail-fast: false
matrix:
os: [macos-14, macos-13, macos-12]

runs-on: ${{ matrix.os }}

env:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1

steps:
- name: create a local tap for homebrew
run: |
MY_FORMULA_DIR="$(brew --repository)/Library/Taps/leleliu008/homebrew-tmp/Formula"
install -d "$MY_FORMULA_DIR"
cat > "$MY_FORMULA_DIR/ppkg.rb" <<EOF
class Ppkg < Formula
desc "A portable package manager for Unix-like system"
homepage "https://github.com/leleliu008/ppkg"
head "https://github.com/leleliu008/ppkg.git", branch: "c"
url "https://github.com/leleliu008/ppkg.git", revision: "${{ github.sha }}"
version "0.1000.2"
license "Apache-2.0"
depends_on "llvm" => :build
depends_on "cmake" => :build
depends_on "ninja" => :build
depends_on "pkg-config" => :build
depends_on "curl"
depends_on "jansson"
depends_on "libyaml"
depends_on "libgit2"
depends_on "libarchive"
def install
cc = Formula["llvm"].opt_bin/"clang"
system "cmake", "-S", ".", "-B", "build", "-DCMAKE_C_COMPILER=#{cc}", "-DCMAKE_C_FLAGS='-fsanitize=undefined -fsanitize=address -fsanitize=leak'", *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end
test do
system "#{bin}/ppkg", "--help"
end
end
EOF
- run: brew info ppkg
- run: brew install ppkg

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ cmake --install build.d
## Build from C source locally via [HomeBrew](https://brew.sh/)

```bash
brew tap leleliu008/fpliu
brew install ppkg --head
brew install --HEAD leleliu008/fpliu/ppkg
```

## Build from C source locally using your system's default package manager
Expand Down

0 comments on commit c9ea4ab

Please sign in to comment.