From 15d403a3e2342a0bfef17623fe44d0d0ad800a8f Mon Sep 17 00:00:00 2001 From: kojix2 <2xijok@gmail.com> Date: Tue, 30 Apr 2024 14:46:50 +0900 Subject: [PATCH] Add wgsim.rb --- .github/workflows/wgsim-macos.yml | 24 ++++++++++++++++++++++++ .github/workflows/wgsim-ubuntu.yml | 28 ++++++++++++++++++++++++++++ Formula/wgsim.rb | 16 ++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 .github/workflows/wgsim-macos.yml create mode 100644 .github/workflows/wgsim-ubuntu.yml create mode 100644 Formula/wgsim.rb diff --git a/.github/workflows/wgsim-macos.yml b/.github/workflows/wgsim-macos.yml new file mode 100644 index 0000000..a447124 --- /dev/null +++ b/.github/workflows/wgsim-macos.yml @@ -0,0 +1,24 @@ +name: wgsim (macos) # edit + +on: + push: + branches: + - main + paths: + - "Formula/wgsim.rb" # edit + - ".github/workflows/wgsim-macos.yml" # edit + schedule: + - cron: "51 3 * * 6" # Runs at 03:51, only on Saturday + workflow_dispatch: + +jobs: + test_installation: + name: macos + runs-on: macos-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install (macos) + run: | + brew install kojix2/brew/wgsim # edit + wgsim --version # edit diff --git a/.github/workflows/wgsim-ubuntu.yml b/.github/workflows/wgsim-ubuntu.yml new file mode 100644 index 0000000..428b5d5 --- /dev/null +++ b/.github/workflows/wgsim-ubuntu.yml @@ -0,0 +1,28 @@ +name: wgsim (ubuntu) # edit + +on: + push: + branches: + - main + paths: + - "Formula/wgsim.rb" # edit + - ".github/workflows/wgsim-ubuntu.yml" # edit + schedule: + - cron: "51 3 * * 6" # Runs at 03:51, only on Saturday + workflow_dispatch: + +jobs: + test_installation: + name: ubuntu + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install + run: | + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" + brew tap kojix2/brew + brew install kojix2/brew/wgsim # edit + wgsim --version # edit diff --git a/Formula/wgsim.rb b/Formula/wgsim.rb new file mode 100644 index 0000000..b27ef68 --- /dev/null +++ b/Formula/wgsim.rb @@ -0,0 +1,16 @@ +class Wgsim < Formula + version "v0.0.2.alpha" + desc "Reimplement wgsim in Crystal and add extra features." + homepage "https://github.com/kojix2/wgsim" + url "https://github.com/kojix2/wgsim.cr/archive/refs/tags/v0.0.2.alpha.tar.gz" + sha256 "f85601b276700d8b3c3d5208b2cb53e4f486338ad119874e411d13a8ee09381e" + license "MIT" + + depends_on "crystal" + + def install + system "shards build --release" + # system "shards build --release -Dpreview_mt" + bin.install "bin/wgsim" + end +end