Fix upload artifact CI step #531
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] | |
jobs: | |
test: | |
name: Dub Tests | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
dc: [dmd-latest, ldc-latest, dmd-2.107.1, ldc-1.37.0] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install D compile | |
uses: dlang-community/[email protected] | |
with: | |
compiler: ${{ matrix.dc }} | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.dub | |
key: ${{ runner.os }}-dub-${{ hashFiles('**/dub.selections.json') }} | |
restore-keys: | | |
${{ runner.os }}-dub- | |
- name: Install binutils | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt install -y binutils-gold | |
sudo update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.gold" 20 | |
sudo update-alternatives --config ld | |
ld --version | |
- name: Run tests linux | |
if: runner.os == 'Linux' | |
run: | | |
ulimit -c unlimited | |
echo "$PWD/core-dump/corefile-%e-%p-%t" | sudo tee /proc/sys/kernel/core_pattern | |
mkdir core-dump | |
sysctl kernel.core_pattern | |
ulimit -a | |
dub -c=unittest-release | |
- name: Run tests windows | |
if: runner.os != 'Linux' | |
run: | | |
dub -c=unittest-release | |
- uses: actions/upload-artifact@v4 | |
if: ${{ failure() && runner.os == 'Linux' }} | |
with: | |
name: core-dump | |
path: | | |
./core-dump/* | |
./concurrency | |
- name: Build | |
run: dub build |