2020-08-05 21:03:02 +03:00
|
|
|
# TODO
|
|
|
|
# https://github.com/Uriopass/Egregoria/blob/master/.github/workflows/release.yml
|
|
|
|
# has stuff for automating releases
|
2019-12-23 22:51:22 +03:00
|
|
|
name: Build
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
2019-12-27 02:52:25 +03:00
|
|
|
build-windows:
|
|
|
|
runs-on: windows-latest
|
|
|
|
if: "contains(github.event.head_commit.message, '[rebuild]')"
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@master
|
|
|
|
- uses: hecrj/setup-rust-action@v1
|
|
|
|
with:
|
2020-08-27 19:31:59 +03:00
|
|
|
rust-version: 1.46.0
|
2020-09-17 02:26:44 +03:00
|
|
|
- name: Cache build
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: target
|
|
|
|
# The key could include hashFiles('Cargo.lock'), but cargo will figure out what can be reused.
|
|
|
|
key: ${{ runner.os }}-build
|
2020-05-17 19:25:44 +03:00
|
|
|
- name: Build game
|
2019-12-27 02:52:25 +03:00
|
|
|
run: cargo build --release --bin game
|
2020-05-17 19:25:44 +03:00
|
|
|
- name: Build importer
|
|
|
|
run: cargo build --release --bin importer
|
2020-06-11 02:20:16 +03:00
|
|
|
- name: Package release
|
|
|
|
run: ./release/build.sh abst_windows play_abstreet.bat target/release/game.exe target/release/importer.exe
|
|
|
|
shell: bash
|
|
|
|
- name: Upload release
|
2020-05-17 20:04:55 +03:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2020-06-11 02:20:16 +03:00
|
|
|
name: abst_windows
|
2020-06-21 00:04:48 +03:00
|
|
|
path: abst_windows
|
2020-09-15 01:07:23 +03:00
|
|
|
- name: Upload just the binary
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: abst_windows_binary
|
|
|
|
path: target/release/game.exe
|
2019-12-23 22:51:22 +03:00
|
|
|
build-macos:
|
|
|
|
runs-on: macos-latest
|
2019-12-24 02:00:22 +03:00
|
|
|
if: "contains(github.event.head_commit.message, '[rebuild]')"
|
2019-12-23 22:51:22 +03:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@master
|
|
|
|
- uses: hecrj/setup-rust-action@v1
|
|
|
|
with:
|
2020-08-27 19:31:59 +03:00
|
|
|
rust-version: 1.46.0
|
2020-09-17 02:26:44 +03:00
|
|
|
- name: Cache build
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: target
|
|
|
|
# The key could include hashFiles('Cargo.lock'), but cargo will figure out what can be reused.
|
|
|
|
key: ${{ runner.os }}-build
|
2020-05-17 19:25:44 +03:00
|
|
|
- name: Build game
|
2019-12-23 22:51:22 +03:00
|
|
|
run: cargo build --release --bin game
|
2020-05-17 19:25:44 +03:00
|
|
|
- name: Build importer
|
|
|
|
run: cargo build --release --bin importer
|
2020-01-12 01:07:19 +03:00
|
|
|
- name: Package release
|
2020-05-17 19:25:44 +03:00
|
|
|
run: ./release/build.sh abst_mac play_abstreet.sh target/release/game target/release/importer
|
2020-01-12 01:07:19 +03:00
|
|
|
- name: Upload release
|
2020-05-17 20:04:55 +03:00
|
|
|
uses: actions/upload-artifact@v2
|
2019-12-23 23:17:47 +03:00
|
|
|
with:
|
2020-01-16 22:27:15 +03:00
|
|
|
name: abst_mac
|
2020-01-22 21:44:46 +03:00
|
|
|
path: abst_mac.zip
|
2020-09-15 01:07:23 +03:00
|
|
|
- name: Upload just the binary
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: abst_mac_binary
|
|
|
|
path: target/release/game
|
2019-12-23 22:51:22 +03:00
|
|
|
build-linux:
|
|
|
|
runs-on: ubuntu-latest
|
2019-12-24 02:00:22 +03:00
|
|
|
if: "contains(github.event.head_commit.message, '[rebuild]')"
|
2019-12-23 22:51:22 +03:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@master
|
|
|
|
- uses: hecrj/setup-rust-action@v1
|
|
|
|
with:
|
2020-08-27 19:31:59 +03:00
|
|
|
rust-version: 1.46.0
|
2020-07-16 21:34:46 +03:00
|
|
|
- name: Update apt
|
|
|
|
run: sudo apt-get update
|
2020-06-08 02:59:20 +03:00
|
|
|
- name: Install dependencies
|
2020-06-08 03:48:28 +03:00
|
|
|
run: sudo apt-get install xorg-dev libxcb-shape0-dev libxcb-xfixes0-dev
|
2020-09-17 02:26:44 +03:00
|
|
|
- name: Cache build
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: target
|
|
|
|
# The key could include hashFiles('Cargo.lock'), but cargo will figure out what can be reused.
|
|
|
|
key: ${{ runner.os }}-build
|
2020-05-17 19:25:44 +03:00
|
|
|
- name: Build game
|
2019-12-23 22:51:22 +03:00
|
|
|
run: cargo build --release --bin game
|
2020-05-17 19:25:44 +03:00
|
|
|
- name: Build importer
|
|
|
|
run: cargo build --release --bin importer
|
2020-01-12 01:07:19 +03:00
|
|
|
- name: Package release
|
2020-05-17 19:25:44 +03:00
|
|
|
run: ./release/build.sh abst_linux play_abstreet.sh target/release/game target/release/importer
|
2020-01-12 01:07:19 +03:00
|
|
|
- name: Upload release
|
2020-05-17 20:04:55 +03:00
|
|
|
uses: actions/upload-artifact@v2
|
2019-12-23 23:17:47 +03:00
|
|
|
with:
|
2020-01-16 22:27:15 +03:00
|
|
|
name: abst_linux
|
2020-01-22 21:44:46 +03:00
|
|
|
path: abst_linux.zip
|