Skip to content

Rust-based stats server on fly.io #718

Rust-based stats server on fly.io

Rust-based stats server on fly.io #718

Workflow file for this run

name: Self-Build
on:
pull_request:
jobs:
self-build-with-build-version:
name: Self-Build-With-build-version
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
include:
- target_arch: x86_64-pc-windows-msvc
os: windows-latest
- target_arch: aarch64-pc-windows-msvc
os: windows-latest
- target_arch: x86_64-apple-darwin
os: macos-latest
- target_arch: aarch64-apple-darwin
os: macos-latest
- target_arch: x86_64-unknown-linux-gnu
os: ubuntu-20.04
- target_arch: x86_64-unknown-linux-musl
os: ubuntu-20.04
- target_arch: aarch64-unknown-linux-gnu
os: ubuntu-20.04
- target_arch: aarch64-unknown-linux-musl
os: ubuntu-20.04
- target_arch: armv7-unknown-linux-gnueabihf
os: ubuntu-20.04
- target_arch: armv7-unknown-linux-musleabihf
os: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install latest rust
run: rustup toolchain install stable --no-self-update --profile minimal
- name: Build Thyself
env:
TARGET_ARCH: ${{ matrix.target_arch }}
run: |
set -euxo pipefail
VERSION="$(
curl \
--user-agent "cargo-quickinstall build pipeline ([email protected])" \
--fail "https://crates.io/api/v1/crates/cargo-quickinstall" \
| jq -r '.crate|.max_stable_version'
)"
VERSION="$VERSION" ./build-version.sh cargo-quickinstall
ALWAYS_BUILD=1 VERSION="$VERSION" ./build-version.sh cargo-quickinstall
self-build:
name: Self-Build
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
include:
- target_arch: x86_64-pc-windows-msvc
os: windows-latest
- target_arch: x86_64-apple-darwin
os: macos-latest
- target_arch: aarch64-apple-darwin
os: macos-latest
- target_arch: x86_64-unknown-linux-gnu
os: ubuntu-20.04
- target_arch: x86_64-unknown-linux-musl
os: ubuntu-20.04
- target_arch: aarch64-unknown-linux-gnu
os: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install latest rust
run: rustup toolchain install stable --no-self-update --profile minimal
- name: Install Thyself
run: cargo install --path cargo-quickinstall
- name: Install Thyself with Thyself (or fallback to sensei on windows)
run: cargo quickinstall cargo-quickinstall || cargo quickinstall sensei
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-needing-cc:
name: Build package that needs CC
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
include:
- target_arch: x86_64-pc-windows-msvc
os: windows-latest
- target_arch: armv7-unknown-linux-gnueabihf
os: ubuntu-20.04
- target_arch: armv7-unknown-linux-musleabihf
os: ubuntu-20.04
- target_arch: x86_64-apple-darwin
os: macos-latest
- target_arch: aarch64-apple-darwin
os: macos-latest
- target_arch: x86_64-unknown-linux-gnu
os: ubuntu-20.04
- target_arch: x86_64-unknown-linux-musl
os: ubuntu-20.04
- target_arch: aarch64-unknown-linux-gnu
os: ubuntu-20.04
- target_arch: aarch64-unknown-linux-musl
os: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install latest rust
run: rustup toolchain install stable --no-self-update --profile minimal
# FIXME: find a package that needs a working CC but doesn't take quite so long to build.
- name: Build cargo-deny
env:
TARGET_ARCH: ${{ matrix.target_arch }}
run: |
set -euxo pipefail
touch .env
VERSION="$(
curl \
--user-agent "cargo-quickinstall build pipeline ([email protected])" \
--fail "https://crates.io/api/v1/crates/cargo-deny" \
| jq -r '.crate|.max_stable_version'
)"
ALWAYS_BUILD=1 VERSION="$VERSION" TARGET_ARCH="$TARGET_ARCH" ./build-version.sh cargo-deny
build-package-test:
name: Build package test
uses: ./.github/workflows/build-package.yml
secrets: inherit
with:
crate: cargo-quickinstall
version: 0.2.9
target_arch: x86_64-unknown-linux-gnu
build_os: ubuntu-latest
branch: ${{ github.head_ref }}
always_build: 1
skip_upload: true