Skip to content

Commit

Permalink
nightly build
Browse files Browse the repository at this point in the history
  • Loading branch information
JG1VPP committed Jul 3, 2022
1 parent 6002bf3 commit 97864c2
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: build
on:
push:
branches:
- master
jobs:
BuildQxSL:
runs-on: windows-latest
env:
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
steps:
- uses: actions/checkout@v2
- uses: graalvm/setup-graalvm@v1
with:
version: '21.3.2'
java-version: 11
github-token: ${{secrets.GITHUB_TOKEN}}
components: native-image
- uses: gradle/gradle-build-action@v1
with:
arguments: build
gradle-version: current
- run: choco install upx
- run: cp build/libs/qxsl.jar .
- run: native-image -jar qxsl.jar
- run: upx --lzma --best qxsl.exe
- run: gh release upload nightly qxsl.jar --clobber
- run: gh release upload nightly qxsl.exe --clobber
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ QxSL: Amateur-Radio Logging Library & LISP
![image](https://img.shields.io/badge/OpenJDK-SE11-red.svg)
![image](https://img.shields.io/badge/GraalVM-20.0-red.svg)
![image](https://img.shields.io/badge/license-LGPL3-darkblue.svg)
![build](https://github.com/nextzlog/qxsl/actions/workflows/build.yaml/badge.svg)

QxSL is a Java library for processing amateur-radio log files, including scoring and tabulation frameworks for ham radio contests.

Expand Down Expand Up @@ -176,7 +177,7 @@ dependencies {
$ gradle build javadoc publish
```

You can create a native command line application instead of a JAR file.
You can create a [native command line application](https://github.com/nextzlog/qxsl/releases/tag/nightly) instead of a JAR file.
[GraalVM](https://www.graalvm.org) must be installed before compilation.
Then run the commands manually as follows:

Expand Down
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ mainClassName = 'gaas.utils.CommandApp'
repositories.mavenCentral()

dependencies {
implementation 'info.picocli:picocli:4.5.2'
implementation 'info.picocli:picocli:+'
testImplementation 'org.assertj:assertj-core:+'
testImplementation 'org.jruby:jruby-core:+'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:+'
testImplementation 'org.junit.jupiter:junit-jupiter-params:+'
testImplementation 'junit:junit:+'
annotationProcessor 'info.picocli:picocli-codegen:+'
}

compileJava {
Expand Down
22 changes: 22 additions & 0 deletions src/test/java/qxsl/ruler/ContestTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import java.util.TimeZone;

import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
Expand All @@ -28,6 +31,25 @@
* @since 2020/10/14
*/
public final class ContestTest extends Assertions {
private static final String JST = "Asia/Tokyo";
private final TimeZone timeZone;
private final TimeZone testZone;

public ContestTest() {
this.timeZone = TimeZone.getDefault();
this.testZone = TimeZone.getTimeZone(JST);
}

@BeforeEach
public void prepareSystemTimeZone() {
TimeZone.setDefault(timeZone);
}

@AfterEach
public void restoreSystemTimeZone() {
TimeZone.setDefault(testZone);
}

@ParameterizedTest
@MethodSource({"constraintsJA1", "constraintsRTC"})
public void testSummarize(Constraint cs, String fmt) {
Expand Down

0 comments on commit 97864c2

Please sign in to comment.