Skip to content

Linux

Linux #91

name: Linux
on:
create:
workflow_dispatch:
# push:
# branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
env:
APP_NAME: ethertia
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, rust-src, clippy
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install g++ pkg-config libx11-dev libasound2-dev libudev-dev libxkbcommon-x11-0
sudo apt-get install libwayland-dev libxkbcommon-dev
# sudo apt-get install -y mingw-w64 gcc-mingw-w64 g++-mingw-w64 zip
# rustup target add x86_64-apple-darwin
# rustup target add x86_64-pc-windows-msvc # Windows
# cargo install xwin
# xwin --accept-license splat --output ./.xwin
- name: Build for Linux
run: cargo build --release
# - name: Zip Artifact
# run: zip linux-x86_64.zip ./target/release/${APP_NAME}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: linux-artifacts
path: |
./target/release/ethertia
./target/release/dedicated_server
# - name: Upload Artifacts
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ./target/x86_64-apple-darwin/release/${APP_NAME}
# asset_name: ${APP_NAME}-darwin-amd64
# asset_content_type: application/octet-stream
# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# body: |
# This is the release of ${APP_NAME}.
# draft: false
# prerelease: false