Merge pull request #5 from DeterminateSystems/build-in-ci
This commit is contained in:
commit
b81e652412
79
.github/workflows/build.yaml
vendored
79
.github/workflows/build.yaml
vendored
|
@ -6,39 +6,74 @@ on:
|
|||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-artifacts-x86_64-macos:
|
||||
build-artifacts-macOS:
|
||||
runs-on: macos-12
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
|
||||
- name: "Build something"
|
||||
run: "nix develop -c cargo build --release"
|
||||
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
with:
|
||||
# Artifact name
|
||||
name: nix-actions-cache-x86_64-darwin
|
||||
path: target/release/nix-actions-cache
|
||||
retention-days: 1
|
||||
|
||||
build-artifacts-x86_64-linux:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: DeterminateSystems/nix-installer-action-cache@main
|
||||
|
||||
- name: "Build something"
|
||||
run: "nix develop -c cargo build --release"
|
||||
|
||||
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
with:
|
||||
# Artifact name
|
||||
name: nix-actions-cache-x86_64-linux
|
||||
name: nix-actions-cache-macOS
|
||||
path: target/release/nix-actions-cache
|
||||
retention-days: 1
|
||||
|
||||
|
||||
check-artifacts-macOS:
|
||||
runs-on: macos-12
|
||||
needs: build-artifacts-macOS
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: nix-actions-cache-macOS
|
||||
path: cache-binary
|
||||
- name: Make the binary executable
|
||||
run: chmod +x ./cache-binary/nix-actions-cache
|
||||
- uses: DeterminateSystems/nix-installer-action-cache@main
|
||||
with:
|
||||
cache-binary: ./cache-binary/nix-actions-cache
|
||||
|
||||
- name: "Build something"
|
||||
run: "nix develop -c date"
|
||||
|
||||
build-artifacts-Linux:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: DeterminateSystems/nix-installer-action-cache@main
|
||||
|
||||
- name: "Build something"
|
||||
run: "nix develop -c cargo build --release --target x86_64-unknown-linux-musl"
|
||||
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
with:
|
||||
# Artifact name
|
||||
name: nix-actions-cache-Linux
|
||||
path: target/x86_64-unknown-linux-musl/release/nix-actions-cache
|
||||
retention-days: 1
|
||||
|
||||
check-artifacts-Linux:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: build-artifacts-Linux
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: nix-actions-cache-Linux
|
||||
path: cache-binary
|
||||
- name: Make the binary executable
|
||||
run: chmod +x ./cache-binary/nix-actions-cache
|
||||
- uses: DeterminateSystems/nix-installer-action-cache@main
|
||||
with:
|
||||
cache-binary: ./cache-binary/nix-actions-cache
|
||||
|
||||
- name: "Build something"
|
||||
run: "nix develop -c date"
|
||||
|
|
3
.github/workflows/keygen.yaml
vendored
3
.github/workflows/keygen.yaml
vendored
|
@ -6,8 +6,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v2
|
||||
- uses: DeterminateSystems/nix-installer-action-cache@main
|
||||
- name: Expose GitHub Runtime
|
||||
uses: crazy-max/ghaction-github-runtime@v2
|
||||
- name: Dump credentials
|
||||
|
|
|
@ -83,9 +83,10 @@
|
|||
cargo-bloat
|
||||
cargo-edit
|
||||
cargo-udeps
|
||||
|
||||
age
|
||||
];
|
||||
]
|
||||
++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Security
|
||||
++ lib.optional stdenv.hostPlatform.isDarwin (libiconv.override { enableStatic = true; enableShared = false; })
|
||||
;
|
||||
} // cargoCrossEnvs);
|
||||
keygen = pkgs.mkShellNoCC {
|
||||
packages = with pkgs; [
|
||||
|
|
Loading…
Reference in a new issue