Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Build
on: [push]
jobs:
build:
# Set the job to run on the platform specified by the matrix below
runs-on: ${{ matrix.runner }}

# Define the build matrix for cross-compilation
strategy:
matrix:
include:
- name: linux-amd64
runner: ubuntu-latest
target: x86_64-unknown-linux-gnu
- name: win-amd64
runner: windows-latest
target: x86_64-pc-windows-msvc
- name: macos-amd64
runner: macos-latest
target: x86_64-apple-darwin
- name: macos-arm64
runner: macos-latest
target: aarch64-apple-darwin

# The steps to run for each matrix item
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: "${{ matrix.target }}"

- name: Setup Cache
uses: Swatinem/rust-cache@v2

- name: Build Binary
run: cargo build --verbose --locked --release --target ${{ matrix.target }}

- name: Move Binary
shell: bash
run: |
BIN_SUFFIX=""
if [[ "${{ matrix.runner }}" == "windows-latest" ]]; then
BIN_SUFFIX=".exe"
fi

# The built binary output location
BIN_OUTPUT="target/${{ matrix.target }}/release/basiclings${BIN_SUFFIX}"

mkdir artifact
# Move the built binary where you want it
mv "${BIN_OUTPUT}" "./artifact/basiclings${BIN_SUFFIX}"
- name: Build Autotester
shell: bash
run: |
git clone https://github.com/CE-Programming/CEmu.git
cd CEmu/core
make
cd ../tests/autotester
make
cd ../../../
mv "CEmu/tests/autotester/autotester${BIN_SUFFIX}" "./artifact/autotester${BIN_SUFFIX}"
- name: Upload
uses: actions/[email protected]
with:
name: "basiclings-${{ matrix.name }}"
path: "artifact/"
Loading