-
-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #124 from The-Lum/automat
feat: add first files for GitHub Action automation
- Loading branch information
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
# This workflow will run a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | ||
|
||
name: Java Run (with Gradle) and Compress (with Brotli) | ||
|
||
on: | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run-compress: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. | ||
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 | ||
|
||
- name: Run with Gradle | ||
run: gradle run | ||
|
||
- name: Give Brotli version | ||
run: | | ||
brotli -V | ||
- name: TBC... | ||
run: | | ||
echo "TBC" | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
# Author: The-Lum | ||
# Script: | ||
# The script generates all the `x.repx` from raw files | ||
# Usage: | ||
# perl -w script/generateOutput.pl | ||
|
||
use strict; | ||
use warnings; | ||
use feature qw(say); | ||
|
||
# Input dir: | ||
my @raw_files = glob("raw/*"); | ||
|
||
say("::group::Generate `x.repx` using brotli"); | ||
foreach (@raw_files) { | ||
my $o = $_; | ||
$o =~ s/raw/output/; | ||
if (/abc.repx$/) {$o =~ s/abc.repx$/abx.repx/} | ||
if (/def.repx$/) {$o =~ s/def.repx$/dex.repx/} | ||
if (/ghi.repx$/) {$o =~ s/ghi.repx$/ghx.repx/} | ||
|
||
say($_ . " --> " . $o); | ||
my $output = qx/brotli -q 11 -vf -o $o $_/; | ||
say($output); | ||
} | ||
say("::endgroup::"); |