From 6064f8f8845c4b8c2b6b53a79d5ecae744168fcf Mon Sep 17 00:00:00 2001 From: Eduardo Alonso Date: Wed, 22 Jan 2020 02:27:28 +0100 Subject: [PATCH] Add support for github actions * Build for windows/linux. Mac will come whenever G-Mem supports it. --- .github/workflows/build.yml | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..17dbc31 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,46 @@ +name: Java CI + +on: [push] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + name: [linux, windows] + include: + - name: linux + os: ubuntu-latest + artifact_name: G-Mem + - name: windows + os: windows-latest + artifact_name: G-Mem.exe + + steps: + - uses: actions/checkout@v1 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Build with Maven + run: mvn -B package --file pom.xml + + + - name: rust-cargo + uses: actions-rs/cargo@v1.0.1 + with: + command: build + args: --release --manifest-path=G-Mem/Cargo.toml + + - name: Release java part + uses: actions/upload-artifact@v1 + with: + name: G-Earth-${{ matrix.os }} + path: G-Earth/target/bin + + - name: Release rust part + uses: actions/upload-artifact@v1 + with: + name: G-Earth-${{ matrix.os }} + path: G-Mem/target/release/${{ matrix.artifact_name }} \ No newline at end of file