name: Build on: [push] jobs: 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: rust-version: 1.43.0 - name: Build game run: cargo build --release --bin game - name: Build importer run: cargo build --release --bin importer - name: Upload game uses: actions/upload-artifact@v2 with: name: windows_exe path: target/release/game.exe - name: Upload importer uses: actions/upload-artifact@v2 with: name: windows_exe path: target/release/importer.exe build-macos: runs-on: macos-latest if: "contains(github.event.head_commit.message, '[rebuild]')" steps: - uses: actions/checkout@master - uses: hecrj/setup-rust-action@v1 with: rust-version: 1.43.0 - name: Build game run: cargo build --release --bin game - name: Build importer run: cargo build --release --bin importer - name: Package release run: ./release/build.sh abst_mac play_abstreet.sh target/release/game target/release/importer - name: Upload release uses: actions/upload-artifact@v2 with: name: abst_mac path: abst_mac.zip build-linux: runs-on: ubuntu-latest if: "contains(github.event.head_commit.message, '[rebuild]')" steps: - uses: actions/checkout@master - uses: hecrj/setup-rust-action@v1 with: rust-version: 1.43.0 - name: Install dependencies run: sudo apt-get install xorg-dev libxcb-shape0-dev libxcb-xfixes0-dev - name: Build game run: cargo build --release --bin game - name: Build importer run: cargo build --release --bin importer - name: Package release run: ./release/build.sh abst_linux play_abstreet.sh target/release/game target/release/importer - name: Upload release uses: actions/upload-artifact@v2 with: name: abst_linux path: abst_linux.zip