Skip to content

Trigger CI on push and pull requests to any branch instead of just main #1

Trigger CI on push and pull requests to any branch instead of just main

Trigger CI on push and pull requests to any branch instead of just main #1

Workflow file for this run

name: CI
on:
push:
branches: "*"
pull_request:
branches: "*"
jobs:
build_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install b2
run: pip install --upgrade b2
- name: Authorize b2
run: b2 authorize-account ${{ secrets.B2_KEYID }} ${{ secrets.B2_APPKEY }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable-i686-pc-windows-msvc
profile: minimal
default: true
- name: Build
run: cargo build --release
env:
CARGO_NET_GIT_FETCH_WITH_CLI: true
- name: Move built files
run: bash move_built.sh
- name: Sync to B2
run: b2 sync ./OUTPUT/ b2://geph-dl/geph4-binaries/
build_osx:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install b2
run: |
pip3 install --upgrade b2
- name: Authorize b2
run: b2 authorize-account ${{ secrets.B2_KEYID }} ${{ secrets.B2_APPKEY }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
default: true
- name: Build
run: cargo build --release --locked --target x86_64-apple-darwin
- name: Move built files
run: sh move_built.sh
- name: Sync to B2
run: b2 sync ./OUTPUT/ b2://geph-dl/geph4-binaries/
build_cross_android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install b2
run: pip3 install --upgrade b2
- name: Authorize b2
run: b2 authorize-account ${{ secrets.B2_KEYID }} ${{ secrets.B2_APPKEY }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
default: true
- name: Setup cross-compilation
run: sh cross-setup.sh
- name: Install cross
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Build for armv7-linux-androideabi
run: cross build --release --locked --target armv7-linux-androideabi
- name: Build for aarch64-linux-android
run: cross build --release --locked --target aarch64-linux-android
- name: Move built files
run: sh move_built.sh
- name: Sync to B2
run: b2 sync ./OUTPUT/ b2://geph-dl/geph4-binaries/
build_cross_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install b2
run: pip3 install --upgrade b2
- name: Authorize b2
run: b2 authorize-account ${{ secrets.B2_KEYID }} ${{ secrets.B2_APPKEY }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
default: true
- name: Install cross
run: cargo install cross --locked
- name: Build for armv7-unknown-linux-musleabihf
run: cross build --release --locked --target armv7-unknown-linux-musleabihf
- name: Build for x86_64-unknown-linux-musl
run: cross build --release --locked --target x86_64-unknown-linux-musl
- name: Move built files
run: sh move_built.sh
- name: Sync to B2
run: b2 sync ./OUTPUT/ b2://geph-dl/geph4-binaries/