|
57 | 57 |
|
58 | 58 | - name: cargo clippy |
59 | 59 | run: cargo +nightly clippy --all --all-features -- -D warnings |
60 | | - |
61 | | - |
62 | | - build: |
63 | | - name: ${{ matrix.job.target }} (${{ matrix.job.os }}) |
64 | | - runs-on: ${{ matrix.job.os }} |
65 | | - strategy: |
66 | | - fail-fast: false |
67 | | - matrix: |
68 | | - job: |
69 | | - - { target: x86_64-unknown-linux-gnu , os: ubuntu-20.04 } |
70 | | - - { target: x86_64-apple-darwin , os: macos-10.15 } |
71 | | - - { target: i686-pc-windows-msvc , os: windows-2019 } |
72 | | - - { target: x86_64-pc-windows-gnu , os: windows-2019 } |
73 | | - - { target: x86_64-pc-windows-msvc , os: windows-2019 } |
74 | | - |
75 | | - steps: |
76 | | - - name: Checkout source code |
77 | | - uses: actions/checkout@v2 |
78 | | - |
79 | | - - name: Install prerequisites |
80 | | - shell: bash |
81 | | - run: | |
82 | | - case ${{ matrix.job.target }} in |
83 | | - arm-unknown-linux-*) sudo apt-get -y update ; sudo apt-get -y install gcc-arm-linux-gnueabihf ;; |
84 | | - aarch64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;; |
85 | | - esac |
86 | | -
|
87 | | - - name: Install packages (Ubuntu) |
88 | | - if: matrix.job.os == 'ubuntu-20.04' |
89 | | - run: | |
90 | | - sudo apt update |
91 | | - sudo apt install libudev-dev pkg-config |
92 | | -
|
93 | | - - name: Extract crate information |
94 | | - shell: bash |
95 | | - run: | |
96 | | - echo "PROJECT_NAME=$(sed -n 's/^name = "\(.*\)"/\1/p' Cargo.toml | head -n1)" >> $GITHUB_ENV |
97 | | - echo "PROJECT_VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)" >> $GITHUB_ENV |
98 | | -
|
99 | | - - name: Install Rust toolchain |
100 | | - uses: actions-rs/toolchain@v1 |
101 | | - with: |
102 | | - toolchain: stable |
103 | | - target: ${{ matrix.job.target }} |
104 | | - override: true |
105 | | - profile: minimal |
106 | | - |
107 | | - - name: Show installed version information (Rust, cargo, GCC,...) |
108 | | - shell: bash |
109 | | - run: | |
110 | | - gcc --version || true |
111 | | - rustup -V |
112 | | - rustup toolchain list |
113 | | - rustup default |
114 | | - cargo -V |
115 | | - rustc -V |
116 | | -
|
117 | | - - uses: Swatinem/rust-cache@v1 |
118 | | - with: |
119 | | - cache-on-failure: true |
120 | | - |
121 | | - - name: Build foundry and call crates |
122 | | - uses: actions-rs/cargo@v1 |
123 | | - with: |
124 | | - use-cross: ${{ matrix.job.use-cross }} |
125 | | - command: build |
126 | | - args: --verbose --workspace |
127 | | - |
128 | | - - name: Run forge |
129 | | - uses: actions-rs/cargo@v1 |
130 | | - with: |
131 | | - use-cross: ${{ matrix.job.use-cross }} |
132 | | - command: run |
133 | | - args: -p foundry-cli --bin forge -- --help |
134 | | - |
135 | | - - name: Run tests without --default-features to avoid solc-asm being used |
136 | | - uses: actions-rs/cargo@v1 |
137 | | - with: |
138 | | - use-cross: ${{ matrix.job.use-cross }} |
139 | | - command: test |
140 | | - args: --verbose --workspace |
0 commit comments