chore: add getMemory workflow and archive dist folder on main workflow
This commit is contained in:
parent
356af32531
commit
f8df8da8de
9 changed files with 94 additions and 80 deletions
34
.github/workflows/application.yml
vendored
Normal file
34
.github/workflows/application.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
name: Application
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
java-version: ["1.8", "1.9", "1.10", "1.11", "1.12", "1.13", "1.14"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up JDK ${{ matrix.java-version }}
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: ${{ matrix.java-version }}
|
||||
|
||||
- name: Marke gradle as executable
|
||||
run: chmod a+x gradlew
|
||||
|
||||
- name: Test
|
||||
run: ./gradlew test
|
||||
|
||||
- name: Build
|
||||
run: ./gradlew build
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
if: ${{ matrix.java-version == '1.8' }}
|
||||
with:
|
||||
name: ATLauncher
|
||||
path: dist/*
|
35
.github/workflows/getMemory.yml
vendored
Normal file
35
.github/workflows/getMemory.yml
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
name: getMemory
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Setup and install Go 1.14
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: "1.14"
|
||||
|
||||
- name: Install memory dependency
|
||||
run: go get github.com/pbnjay/memory
|
||||
working-directory: getMemory
|
||||
|
||||
- name: Build artifacts
|
||||
run: |
|
||||
GOOS=windows GOARCH=386 go build -o dist/getMemory.exe getMemory.go
|
||||
GOOS=linux GOARCH=386 go build -o dist/getMemory-linux getMemory.go
|
||||
GOOS=darwin GOARCH=386 go build -o dist/getMemory-osx getMemory.go
|
||||
GOOS=windows GOARCH=amd64 go build -o dist/getMemory-x64.exe getMemory.go
|
||||
GOOS=linux GOARCH=amd64 go build -o dist/getMemory-x64-linux getMemory.go
|
||||
GOOS=darwin GOARCH=amd64 go build -o dist/getMemory-x64-osx getMemory.go
|
||||
working-directory: getMemory
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: getMemory
|
||||
path: getMemory/dist/*
|
28
.github/workflows/gradle.yml
vendored
28
.github/workflows/gradle.yml
vendored
|
@ -1,28 +0,0 @@
|
|||
name: Java CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
java_version: ['1.8', '1.9', '1.10', '1.11', '1.12']
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
|
||||
- name: Set up JDK ${{ matrix.java_version }}
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
version: ${{ matrix.java_version }}
|
||||
|
||||
- name: Marke gradle as executable
|
||||
run: chmod a+x gradlew
|
||||
|
||||
- name: Test
|
||||
run: ./gradlew test
|
||||
|
||||
- name: Build
|
||||
run: ./gradlew build
|
|
@ -1,6 +1,6 @@
|
|||
# ATLauncher
|
||||
|
||||
[![CircleCI](https://circleci.com/gh/ATLauncher/ATLauncher/tree/master.svg?style=shield)](https://circleci.com/gh/ATLauncher/ATLauncher/tree/master)
|
||||
![Application](https://github.com/ATLauncher/ATLauncher/workflows/Application/badge.svg?branch=master)
|
||||
[![Discord](https://discordapp.com/api/guilds/117047818136322057/embed.png?style=shield)](https://atl.pw/discordfromgithub)
|
||||
|
||||
## What is it
|
||||
|
|
4
getMemory/.gitignore
vendored
4
getMemory/.gitignore
vendored
|
@ -1,3 +1 @@
|
|||
getMemory*-linux
|
||||
getMemory*-osx
|
||||
getMemory*.exe
|
||||
dist
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
FROM golang:latest
|
||||
FROM golang:1.14
|
||||
|
||||
RUN mkdir /app
|
||||
ADD getMemory.go /app/
|
||||
ADD getMemory.go /app
|
||||
|
||||
WORKDIR /app
|
||||
RUN go get github.com/pbnjay/memory
|
||||
RUN GOOS=windows GOARCH=386 go build -o getMemory.exe getMemory.go
|
||||
RUN GOOS=linux GOARCH=386 go build -o getMemory-linux getMemory.go
|
||||
RUN GOOS=darwin GOARCH=386 go build -o getMemory-osx getMemory.go
|
||||
RUN GOOS=windows GOARCH=amd64 go build -o getMemory-x64.exe getMemory.go
|
||||
RUN GOOS=linux GOARCH=amd64 go build -o getMemory-x64-linux getMemory.go
|
||||
RUN GOOS=darwin GOARCH=amd64 go build -o getMemory-x64-osx getMemory.go
|
||||
|
||||
RUN go get github.com/pbnjay/memory \
|
||||
&& GOOS=windows GOARCH=386 go build -o dist/getMemory.exe getMemory.go \
|
||||
&& GOOS=linux GOARCH=386 go build -o dist/getMemory-linux getMemory.go \
|
||||
&& GOOS=darwin GOARCH=386 go build -o dist/getMemory-osx getMemory.go \
|
||||
&& GOOS=windows GOARCH=amd64 go build -o dist/getMemory-x64.exe getMemory.go \
|
||||
&& GOOS=linux GOARCH=amd64 go build -o dist/getMemory-x64-linux getMemory.go \
|
||||
&& GOOS=darwin GOARCH=amd64 go build -o dist/getMemory-x64-osx getMemory.go
|
||||
|
|
|
@ -1,34 +1,17 @@
|
|||
# getMemory
|
||||
|
||||
This small go program simply prints out the detected system ram in the system
|
||||
![getMemory](https://github.com/ATLauncher/ATLauncher/workflows/getMemory/badge.svg)
|
||||
|
||||
To build you will need to have go installed, and then run:
|
||||
This small go program simply prints out the detected system ram in the system.
|
||||
|
||||
## Building
|
||||
|
||||
To build, first make sure you have Docker installed on your machine.
|
||||
|
||||
Then you can simply run the below command:
|
||||
|
||||
```sh
|
||||
go get github.com/pbnjay/memory
|
||||
GOOS=windows GOARCH=386 go build -o getMemory.exe getMemory.go
|
||||
GOOS=linux GOARCH=386 go build -o getMemory-linux getMemory.go
|
||||
GOOS=darwin GOARCH=386 go build -o getMemory-osx getMemory.go
|
||||
./generateBinary
|
||||
```
|
||||
|
||||
Alternatively create the Dockerfile:
|
||||
|
||||
```sh
|
||||
docker create -t getmemory .
|
||||
```
|
||||
|
||||
That will spit out an image id. You can then run:
|
||||
|
||||
```sh
|
||||
docker cp 2a5d878266d8d0789c0941707bc6a714e6b3986b67999059ba782dc18e7063de:/app/getMemory.exe .
|
||||
docker cp 2a5d878266d8d0789c0941707bc6a714e6b3986b67999059ba782dc18e7063de:/app/getMemory-linux .
|
||||
docker cp 2a5d878266d8d0789c0941707bc6a714e6b3986b67999059ba782dc18e7063de:/app/getMemory-osx .
|
||||
```
|
||||
|
||||
Alternatively just run:
|
||||
|
||||
```sh
|
||||
./generateBinary.sh
|
||||
// or
|
||||
./generateBinary.bat
|
||||
```
|
||||
This will spit out the built files into the `dist` directory.
|
||||
|
|
|
@ -3,9 +3,4 @@ FOR /F "tokens=* USEBACKQ" %%F IN (`docker create -t getmemory`) DO (
|
|||
SET IMAGE_ID=%%F
|
||||
)
|
||||
|
||||
docker cp %IMAGE_ID%:/app/getMemory.exe .
|
||||
docker cp %IMAGE_ID%:/app/getMemory-x64.exe .
|
||||
docker cp %IMAGE_ID%:/app/getMemory-linux .
|
||||
docker cp %IMAGE_ID%:/app/getMemory-x64-linux .
|
||||
docker cp %IMAGE_ID%:/app/getMemory-osx .
|
||||
docker cp %IMAGE_ID%:/app/getMemory-x64-osx .
|
||||
docker cp %IMAGE_ID%:/app/dist .
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
docker build -t getmemory .
|
||||
IMAGE_ID=`docker create -t getmemory .`
|
||||
|
||||
docker cp ${IMAGE_ID}:/app/getMemory.exe .
|
||||
docker cp ${IMAGE_ID}:/app/getMemory-x64.exe .
|
||||
docker cp ${IMAGE_ID}:/app/getMemory-linux .
|
||||
docker cp ${IMAGE_ID}:/app/getMemory-x64-linux .
|
||||
docker cp ${IMAGE_ID}:/app/getMemory-osx .
|
||||
docker cp ${IMAGE_ID}:/app/getMemory-x64-osx .
|
||||
docker cp ${IMAGE_ID}:/app/dist .
|
||||
|
|
Loading…
Reference in a new issue