refactor #481
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: [push, pull_request] | |
jobs: | |
feature-matrix: | |
uses: ./.github/workflows/feature-matrix.yml | |
loc: | |
name: count LOC | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- run: cargo install tokei | |
- run: tokei ./ | |
build: | |
name: build ${{ matrix.package.name }} (${{ matrix.package.features }}) | |
runs-on: ubuntu-latest | |
needs: [feature-matrix] | |
strategy: | |
fail-fast: false | |
matrix: | |
package: ${{ fromJson(needs.feature-matrix.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Install accelsim dependencies | |
if: ${{ matrix.package.need_accelsim_build_dependencies }} | |
run: >- | |
sudo apt-get install -y wget build-essential xutils-dev bison zlib1g-dev flex libglu1-mesa-dev libssl-dev libxml2-dev libboost-all-dev git g++ | |
- name: Install CUDA | |
uses: Jimver/[email protected] | |
id: cuda-toolkit | |
if: ${{ matrix.package.need_cuda }} | |
with: | |
cuda: "11.8.0" | |
method: "network" | |
use-github-cache: true | |
# list of available packages here: | |
# https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ | |
sub-packages: '["nvcc", "runtime", "profiler-api"]' | |
- name: Build all | |
run: >- | |
cargo build --package "${{ matrix.package.name }}" --features "${{ matrix.package.features }}" |