Skip to content

Commit

Permalink
feat: add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
KagChi authored Jun 5, 2024
1 parent c576e09 commit aa311b2
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: compile-natives

on:
push:
branches: [ "main" ]

jobs:
linux:
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
- target: i686-unknown-linux-gnu
deps: apt-get install -y gcc-multilib
- target: aarch64-unknown-linux-gnu
deps: apt-get install -y gcc-aarch64-linux-gnu
- target: armv7-unknown-linux-gnueabihf
deps: apt-get install -y gcc-arm-linux-gnueabihf

name: Compile ${{ matrix.target }} target
runs-on: ubuntu-20.04
container:
image: ubuntu:16.04
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install Essentials
run: |
apt-get update -y
apt-get upgrade -y
apt-get install -y curl gcc openjdk-8-jdk-headless
- name: Install Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1
with:
profile: minimal
toolchain: stable
override: true
target: ${{ matrix.target }}
- name: Install linker dependencies
run: ${{ matrix.deps }}
if: ${{ matrix.deps != '' }}
- name: Compile natives
working-directory: native
run: cargo build -r --target=${{ matrix.target }}
windows:
strategy:
matrix:
include:
- target: x86_64-pc-windows-msvc
- target: i686-pc-windows-msvc

name: Compile ${{ matrix.target }} target
environment: MavenRelease
runs-on: windows-2019
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1
with:
profile: minimal
toolchain: stable
override: true
target: ${{ matrix.target }}
- name: Compile natives
working-directory: native
run: cargo build -r --target=${{ matrix.target }}

0 comments on commit aa311b2

Please sign in to comment.