diff --git a/.github/workflows/macos-brew.yml b/.github/workflows/macos-brew.yml index 9ca59fb..08f47c9 100644 --- a/.github/workflows/macos-brew.yml +++ b/.github/workflows/macos-brew.yml @@ -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" < :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 diff --git a/README.md b/README.md index 7844835..8994557 100644 --- a/README.md +++ b/README.md @@ -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