Skip to content

Fix libgcc dep for nix build #227

Fix libgcc dep for nix build

Fix libgcc dep for nix build #227

Workflow file for this run

name: Build / Development
on:
pull_request:
branches:
- main
jobs:
build-dev:
name: ${{ matrix.os }}-${{ matrix.target }}-${{ matrix.toolchain }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# we only need to support linux
os: [ubuntu-20.04, ubuntu-latest]
# TODO: do we want to support musl?
target: [x86_64-unknown-linux-gnu]
# make sure it runs on latest stable
toolchain: [stable]
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
submodules: true
- name: Install Toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: Install Protoc
uses: arduino/setup-protoc@v3
- name: Show Rust toolchain version
shell: bash
run: |
cargo -V
cargo clippy -V
cargo fmt -- -V
rustc -V
# - name: Setup musl-tools
# if: matrix.target == 'x86_64-unknown-linux-musl'
# shell: bash
# run: sudo apt -y install musl-tools
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Generate version
id: gen-version
shell: bash
run: echo 'VERSION=0.0.0-${{ github.sha }}' >> $GITHUB_OUTPUT
- name: Replace version
uses: ./.github/actions/replace-version
with:
version: ${{ steps.gen-version.outputs.VERSION }}
- name: Build Psh
uses: ./.github/actions/build
with:
target: ${{ matrix.target }}
release: false
# - name: Generate artifacts name
# id: gen-name
# shell: bash
# run: echo 'NAME=psh-dev-${{ matrix.os }}-${{ matrix.target }}-${{ matrix.toolchain }}' >> $GITHUB_OUTPUT
#- name: Upload artifacts
# uses: actions/upload-artifact@v3
# with:
# name: ${{ steps.gen-name.outputs.NAME }}
#path: ./target/${{ matrix.target }}/debug/psh
#if-no-files-found: error