Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
me-and committed Oct 26, 2023
1 parent 736a718 commit bbd96fb
Showing 1 changed file with 3 additions and 106 deletions.
109 changes: 3 additions & 106 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,110 +91,7 @@ jobs:
- BUILD_REQUIRES
cygwin_bin_path: C:\cygwin\bin

# Cache hit here means we can skip most of the rest of this job, since
# this job is essentially building this cache.
- name: Use build cache
id: build-cache
uses: actions/cache@v3
with:
key: ${{ steps.data.outputs.NAME }}-build-${{ github.sha }}
path: build-results.tar

- name: Install Cygwin build requirements
if: steps.build-cache.outputs.cache-hit != 'true'
uses: cygwin/cygwin-install-action@db475590d56881c6cef7b3f96f6f3dd9532ea1f4
with:
packages: ${{ steps.data.outputs.BUILD_REQUIRES }}
add-to-path: false

# Check if the package downloads have changed if there's any chance we've
# managed to reasonably update them.
- name: Check if package cache needs updating
if: always() && steps.install-bootstrap.outcome == 'success'
working-directory: C:\
shell: bash
run: |
if [[ -d cygwin-packages ]]; then
find cygwin-packages -type f ! -name setup.ini -print0 |
sort -z |
xargs -0 b2sum >cygwin-package-checksum.new
if ! diff cygwin-package-checksum.old cygwin-package-checksum.new; then
echo UPDATE_CYGWIN_PACKAGE_CACHE=YesPlease | tee -a "$GITHUB_ENV"
fi
fi
- name: Store package cache
if: always() && env.UPDATE_CYGWIN_PACKAGE_CACHE == 'YesPlease'
uses: actions/cache/save@v3
with:
key: cygwin-packages-${{ github.run_id }}-${{ github.run_attempt }}
path: C:\cygwin-packages

- name: Generate cygcheck output
if: always() && steps.install-bootstrap.outcome != 'skipped'
run: C:\cygwin\bin\cygcheck.exe -srv >C:\cygwin\var\log\cygcheck.out

- name: Store Cygwin logs
if: always() && steps.install-bootstrap.outcome != 'skipped'
uses: actions/upload-artifact@v3
with:
name: cygwin-logs
path: C:\cygwin\var\log\

- name: Cygport download
if: steps.build-cache.outputs.cache-hit != 'true'
shell: C:\cygwin\bin\bash.exe --noprofile --norc -e -o pipefail -o igncr {0}
env:
PATH: C:\cygwin\bin
run: cygport "$CYGPORT_FILE" download

- name: Cygport prep
if: steps.build-cache.outputs.cache-hit != 'true'
id: cygport-prep
shell: C:\cygwin\bin\bash.exe --noprofile --norc -e -o pipefail -o igncr {0}
env:
PATH: C:\cygwin\bin
run: cygport "$CYGPORT_FILE" prep

- name: Cygport compile
if: steps.build-cache.outputs.cache-hit != 'true'
shell: C:\cygwin\bin\bash.exe --noprofile --norc -e -o pipefail -o igncr {0}
env:
PATH: C:\cygwin\bin
run: cygport "$CYGPORT_FILE" compile

- name: Cygport test
if: steps.build-cache.outputs.cache-hit != 'true'
shell: C:\cygwin\bin\bash.exe --noprofile --norc -e -o pipefail -o igncr {0}
- name: Report output
env:
PATH: C:\cygwin\bin
run: cygport "$CYGPORT_FILE" test

- name: Cygport install
if: steps.build-cache.outputs.cache-hit != 'true'
shell: C:\cygwin\bin\bash.exe --noprofile --norc -e -o pipefail -o igncr {0}
env:
PATH: C:\cygwin\bin
run: cygport "$CYGPORT_FILE" install

- name: Cygport package
if: steps.build-cache.outputs.cache-hit != 'true'
shell: C:\cygwin\bin\bash.exe --noprofile --norc -e -o pipefail -o igncr {0}
env:
PATH: C:\cygwin\bin
run: cygport "$CYGPORT_FILE" package

- name: Tar up build results
if: always() && steps.cygport-prep.outcome != 'skipped'
shell: C:\cygwin\bin\bash.exe --noprofile --norc -e -o pipefail -o igncr {0}
env:
PATH: C:\cygwin\bin
run: tar -cvf build-results.tar "$CYGPORT_BUILD_DIR"

- name: Store build results
if: always() && steps.cygport-prep.outcome != 'skipped'
uses: actions/upload-artifact@v3
with:
name: build-results
path: build-results.tar
if-no-files-found: error
DATA: ${{ steps.data.outputs.vars }}
run: printf '%q\n' "$DATA"

0 comments on commit bbd96fb

Please sign in to comment.