Build #179
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: | |
branches: ['*', '!main'] | |
pull_request: | |
workflow_dispatch: | |
workflow_call: | |
schedule: | |
- cron: "0 6 * * 6" | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [macos-13, ubuntu-22.04] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup | |
- run: make | |
- run: make test COVERAGE=1 | |
- run: make smoke-test-encrypt | |
- run: make lint | |
# We don't have swift-format on Linux yet | |
if: runner.os == 'macOS' | |
# Build & upload site artifacts | |
# Deploy happens in the `build-main` workflow, which only runs on main | |
- run: | | |
mkdir -p .build/site/ci | |
cp .build/coverage.svg .build/coverage.html .build/site/ci | |
shell: bash | |
- uses: actions/upload-pages-artifact@v1 | |
with: | |
path: .build/site | |
if: runner.os == 'macOS' | |
# Running swift from the Makefile doesn't work (yet), so we have a separate | |
# build procedure for windows. | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup | |
- run: swift build | |
# Unit tests don't seem to work yet | |
# - run: swift test | |
- name: Run smoke test | |
run: | | |
$Env:Path += ";" + (swift build --show-bin-path) | |
echo "test" | age --encrypt --recipient age1se1qgg72x2qfk9wg3wh0qg9u0v7l5dkq4jx69fv80p6wdus3ftg6flwg5dz2dp -o secret.txt.age |