Skip to content

Commit

Permalink
Merge pull request #21 from jiro4989/feature/#19/java16
Browse files Browse the repository at this point in the history
OpenJDK14から16に変更 #19 + CIをtag push式に変更 #20
  • Loading branch information
jiro4989 authored Nov 24, 2021
2 parents eee5eb9 + c91e326 commit 460c967
Show file tree
Hide file tree
Showing 14 changed files with 327 additions and 201 deletions.
120 changes: 0 additions & 120 deletions .github/workflows/main.yml

This file was deleted.

69 changes: 69 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---

name: release

"on":
push:
tags:
- 'v*.*.*'

env:
APP_NAME: 'tkite'
JAVA_VERSION: '16'
JAVAFX_VERSION: '16'

defaults:
run:
shell: bash

jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
os_name: windows
archive_cmd: 7z a
artifact_ext: .zip
entrypoint_script_ext: .bat

- os: macOS-latest
os_name: osx
archive_cmd: tar czf
artifact_ext: .tar.gz
entrypoint_script_ext: ''

- os: ubuntu-latest
os_name: linux
archive_cmd: tar czf
artifact_ext: .tar.gz
entrypoint_script_ext: ''
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: ${{ env.JAVA_VERSION }}
java-package: jdk
architecture: x64
- name: Build
run: >
ORG_GRADLE_PROJECT_CI_VERSION="${GITHUB_REF##*/}"
ORG_GRADLE_PROJECT_CI_COMMIT_HASH="$(git rev-parse HEAD)"
./gradlew build -x test
- name: Create artifact
run: >
OS_NAME="${{ matrix.os_name }}"
ARCHIVE_CMD="${{ matrix.archive_cmd }}"
ARTIFACT_EXT="${{ matrix.artifact_ext }}"
ENTRYPOINT_SCRIPT_EXT="${{ matrix.entrypoint_script_ext }}"
VERSION="${GITHUB_REF##*/}"
./script/create_artifact.sh
- name: Release
uses: softprops/action-gh-release@v1
with:
files: 'dist/${{ env.APP_NAME }}_*.*'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
95 changes: 95 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---

name: test

"on":
push:
paths-ignore:
- 'LICENSE'
- 'README.*'
- 'docs/*'
branches:
- master
pull_request:
paths-ignore:
- 'LICENSE'
- 'README.*'
- 'docs/*'

env:
APP_NAME: 'tkite'
JAVA_VERSION: '16'
JAVAFX_VERSION: '16'

defaults:
run:
shell: bash

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: ${{ env.JAVA_VERSION }}
java-package: jdk
architecture: x64
- name: Install xvfb
run: sudo apt install -y xvfb
- name: Check code style
run: ./gradlew spotlessCheck
- name: Test
run: xvfb-run ./gradlew test

build-artifact:
runs-on: ${{ matrix.os }}
env:
VERSION: ci
strategy:
matrix:
include:
- os: windows-latest
os_name: windows
archive_cmd: 7z a
artifact_ext: .zip
entrypoint_script_ext: .bat

- os: macOS-latest
os_name: osx
archive_cmd: tar czf
artifact_ext: .tar.gz
entrypoint_script_ext: ''

- os: ubuntu-latest
os_name: linux
archive_cmd: tar czf
artifact_ext: .tar.gz
entrypoint_script_ext: ''
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: ${{ env.JAVA_VERSION }}
java-package: jdk
architecture: x64
- name: Build
run: >
ORG_GRADLE_PROJECT_CI_VERSION="${VERSION}"
ORG_GRADLE_PROJECT_CI_COMMIT_HASH="$(git rev-parse HEAD)"
./gradlew build -x test
- name: Create artifact
run: >
OS_NAME="${{ matrix.os_name }}"
ARCHIVE_CMD="${{ matrix.archive_cmd }}"
ARTIFACT_EXT="${{ matrix.artifact_ext }}"
ENTRYPOINT_SCRIPT_EXT="${{ matrix.entrypoint_script_ext }}"
./script/create_artifact.sh
- uses: actions/upload-artifact@v2
with:
name: artifact
path: |
./dist/*
if: github.ref != 'refs/heads/master'
18 changes: 6 additions & 12 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
:sectnums:

image:https://github.com/jiro4989/TKoolImageTileEditor/workflows/build/badge.svg[build, link=https://github.com/jiro4989/TKoolImageTileEditor/actions]
image:https://codecov.io/gh/jiro4989/TKoolImageTileEditor/branch/master/graph/badge.svg[codecov, link=https://codecov.io/gh/jiro4989/TKoolImageTileEditor]

image::./docs/demo.gif[]

Expand Down Expand Up @@ -264,23 +263,18 @@ GPL-2.0

=== 前提条件

* Java 14
* Java 16
* Ubuntu 20.04

環境変数JAVA_HOMEも設定すること。
以下のコマンドでUbuntuでは環境が整う。
以下のインストールスクリプトを実行すると環境が整う。

[source,bash]
----
curl -O https://download.java.net/java/GA/jdk14/076bab302c7b4508975440c56f6cc26a/36/GPL/openjdk-14_linux-x64_bin.tar.gz
tar xvf openjdk-14_linux-x64_bin.tar.gz
mkdir -p /opt/java
mv jdk-14 /opt/java/
ln -sfn /opt/java/jdk-14 /opt/java/current
export JAVA_HOME=/opt/java/current
./script/install_java.sh
----

実行したら環境変数 `JAVA_HOME` を設定すること。

=== ビルド手順

以下のコマンドを実行する。
Expand Down
Loading

0 comments on commit 460c967

Please sign in to comment.