Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

chore: update to use new GH markdown syntax #997

chore: update to use new GH markdown syntax

chore: update to use new GH markdown syntax #997

Workflow file for this run

name: nix
on:
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-bin:
strategy:
matrix:
config:
- target: aarch64-apple-darwin
install-path: /bin/wash
test-bin: file ./result/bin/wash
test-oci: docker load < ./result
- target: aarch64-linux-android
install-path: /bin/wash
test-bin: file ./result/bin/wash
test-oci: docker load < ./result
- target: aarch64-unknown-linux-musl
install-path: /bin/wash
test-bin: nix shell --inputs-from . 'nixpkgs#qemu' -c qemu-aarch64 ./result/bin/wash --version
test-oci: docker load < ./result
# TODO: Run aarch64 binary within OCI
- target: x86_64-apple-darwin
install-path: /bin/wash
test-bin: file ./result/bin/wash
test-oci: docker load < ./result
- target: x86_64-pc-windows-gnu
install-path: /bin/wash.exe
test-bin: nix shell --inputs-from . 'nixpkgs#wine64' -c wine64 ./result/bin/wash.exe --version
test-oci: docker load < ./result
# TODO: Run win64 binary within OCI
- target: x86_64-unknown-linux-musl
install-path: /bin/wash
test-bin: ./result/bin/wash --version
test-oci: |
docker load < ./result
docker run --rm wash:$(nix eval --raw .#wash-x86_64-unknown-linux-musl-oci.imageTag) wash --version
name: wash-${{ matrix.config.target }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-nix
with:
cachixAuthToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- uses: ./.github/actions/build-nix
with:
package: wash-${{ matrix.config.target }}
install-path: ${{ matrix.config.install-path }}
- run: ${{ matrix.config.test-bin }}
- uses: ./.github/actions/build-nix
with:
package: wash-${{ matrix.config.target }}-oci
- run: ${{ matrix.config.test-oci }}
build-lipo:
name: wash-universal-darwin
needs: build-bin
runs-on: macos-12
steps:
- uses: actions/download-artifact@v3
with:
name: wash-aarch64-apple-darwin
- uses: actions/download-artifact@v3
with:
name: wash-x86_64-apple-darwin
- run: lipo -create ./wash-aarch64-apple-darwin ./wash-x86_64-apple-darwin -output ./wash-universal-darwin
- run: chmod +x ./wash-universal-darwin
- run: ./wash-universal-darwin --version
- uses: actions/upload-artifact@v3
with:
name: wash-universal-darwin
path: wash-universal-darwin
test-windows:
runs-on: windows-2022
needs: build-bin
steps:
- uses: actions/download-artifact@v3
with:
name: wash-x86_64-pc-windows-gnu
# TODO: Verify that this actually starts the binary
- run: .\wash-x86_64-pc-windows-gnu --version
cargo:
strategy:
matrix:
check:
- fmt
- clippy
- nextest
name: cargo ${{ matrix.check }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-nix
with:
cachixAuthToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build -L .#checks.x86_64-linux.${{ matrix.check }}
fmt:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-nix
with:
cachixAuthToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix fmt
run:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-nix
with:
cachixAuthToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix run -L . -- --version
develop:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-nix
with:
cachixAuthToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix develop -L --ignore-environment -c cargo pkgid