This repository was archived by the owner on Jan 13, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (91 loc) · 4.07 KB
/
cli.yml
File metadata and controls
105 lines (91 loc) · 4.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: CLI
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
build:
if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')"
strategy:
fail-fast: true
matrix:
os: [ 'windows-latest' ]
java: [ 8, 11, 16 ]
runs-on: ${{ matrix.os }}
steps:
- name: Cache
uses: actions/cache@v3.2.3
with:
# A directory to store and save the cache
path: cache
# An explicit key for restoring and saving the cache
key: cache
- name: Checkout Source
uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3.9.0
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'maven'
#- name: Initialize CodeQL
# uses: github/codeql-action/init@main
# with:
# languages: java
# # queries: security-extended,security-and-quality,github/codeql/java/ql/src/codeql-suites/java-lgtm-full.qls@main
- name: Install Wine
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
brew install --cask wine-stable
elif [ "$RUNNER_OS" == "Linux" ]; then
sudo dpkg --add-architecture i386
sudo apt update
wget -qO- https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
sudo apt install software-properties-common
sudo apt-add-repository 'deb http://dl.winehq.org/wine-builds/ubuntu/ bionic main'
wget -qO- https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/Release.key | sudo apt-key add -
sudo sh -c 'echo "deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/ ./" > /etc/apt/sources.list.d/obs.list'
sudo apt update
sudo apt-get install --install-recommends winehq-stable
fi
if: runner.os != 'Windows'
- name: Test CLI
run: |
.\start.cmd no-auto-restart patch-only version 1.16.5 online-mode
.\start.cmd gencode client save exit client.txt
.\start.cmd gencode mac save exit mac.sh
.\start.cmd gencode linux exit
git add -f start.sh
git update-index --chmod=+x start.sh
if: runner.os == 'Windows'
- name: Test CLI
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
chmod u+x start.cmd
wine cmd /c start.cmd gencode mac exit patch-only version 1.16.5 online-mode
chmod u+x start.sh
./start.sh
elif [ "$RUNNER_OS" == "Linux" ]; then
chmod u+x start.cmd
wine cmd /c start.cmd gencode linux exit patch-only version 1.16.5 online-mode
chmod u+x start.sh
./start.sh
else
echo "$RUNNER_OS not supported"
exit 1
fi
if: runner.os != 'Windows'
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: startup-script
path: |
start.cmd
start.sh
#- name: Perform CodeQL Analysis
# uses: github/codeql-action/analyze@main