Skip to content

Commit d26924f

Browse files
committed
Support building against secure packages
1 parent 7bcc712 commit d26924f

File tree

4 files changed

+170
-10
lines changed

4 files changed

+170
-10
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
on:
22
workflow_call:
33
inputs:
4+
flake:
5+
default: "."
6+
type: string
47
system:
58
required: true
69
type: string
@@ -50,8 +53,8 @@ jobs:
5053
- uses: actions/checkout@v4
5154
- uses: DeterminateSystems/determinate-nix-action@main
5255
- uses: DeterminateSystems/flakehub-cache-action@main
53-
- run: nix build .#packages.${{ inputs.system }}.default .#packages.${{ inputs.system }}.binaryTarball --no-link -L
54-
- run: nix build .#packages.${{ inputs.system }}.binaryTarball --out-link tarball
56+
- run: nix build ${{ inputs.flake }}#packages.${{ inputs.system }}.default .#packages.${{ inputs.system }}.binaryTarball --no-link -L
57+
- run: nix build ${{ inputs.flake }}#packages.${{ inputs.system }}.binaryTarball --out-link tarball
5558
- uses: actions/upload-artifact@v4
5659
with:
5760
name: ${{ inputs.system }}
@@ -68,7 +71,7 @@ jobs:
6871
- uses: actions/checkout@v4
6972
- uses: DeterminateSystems/determinate-nix-action@main
7073
- uses: DeterminateSystems/flakehub-cache-action@main
71-
- run: nix flake check -L --system ${{ inputs.system }}
74+
- run: nix flake check ${{ inputs.flake }} -L --system ${{ inputs.system }}
7275

7376
vm_tests_smoke:
7477
if: inputs.run_vm_tests && github.event_name != 'merge_group'
@@ -80,10 +83,10 @@ jobs:
8083
- uses: DeterminateSystems/flakehub-cache-action@main
8184
- run: |
8285
nix build -L \
83-
.#hydraJobs.tests.functional_user \
84-
.#hydraJobs.tests.githubFlakes \
85-
.#hydraJobs.tests.nix-docker \
86-
.#hydraJobs.tests.tarballFlakes \
86+
${{ inputs.flake }}#hydraJobs.tests.functional_user \
87+
${{ inputs.flake }}#hydraJobs.tests.githubFlakes \
88+
${{ inputs.flake }}#hydraJobs.tests.nix-docker \
89+
${{ inputs.flake }}#hydraJobs.tests.tarballFlakes \
8790
;
8891
8992
vm_tests_all:
@@ -102,7 +105,7 @@ jobs:
102105
.hydraJobs.tests
103106
| with_entries(select(.value.type == "derivation"))
104107
| keys[]
105-
| ".#hydraJobs.tests." + .')
108+
| "${{ inputs.flake }}#hydraJobs.tests." + .')
106109
}
107110
108111
if ! cmd; then
@@ -167,7 +170,7 @@ jobs:
167170
mkdir -p "${NSC_CACHE_PATH}/nix/xdg-cache"
168171
export XDG_CACHE_HOME="${NSC_CACHE_PATH}/nix/xdg-cache"
169172
fi
170-
nix build -L --out-link ./new-nix
173+
nix build ${{ inputs.flake }} -L --out-link ./new-nix
171174
export PATH=$(pwd)/new-nix/bin:$PATH
172175
[[ $(type -p nix) = $(pwd)/new-nix/bin/nix ]]
173176
@@ -199,7 +202,7 @@ jobs:
199202
- uses: DeterminateSystems/flakehub-cache-action@main
200203
- name: Build manual
201204
if: inputs.system == 'x86_64-linux'
202-
run: nix build .#hydraJobs.manual
205+
run: nix build ${{ inputs.flake }}#hydraJobs.manual
203206
- uses: nwtgck/[email protected]
204207
if: inputs.publish_manual && inputs.system == 'x86_64-linux'
205208
with:

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,22 @@ jobs:
3030
- uses: DeterminateSystems/determinate-nix-action@main
3131
- run: nix flake show --all-systems --json
3232

33+
build_x86_64-linux_secure:
34+
uses: ./.github/workflows/build.yml
35+
with:
36+
flake: packaging/secure-packages
37+
system: x86_64-linux
38+
runner: namespace-profile-linuxamd32c64g-cache
39+
runner_for_virt: UbuntuLatest32Cores128G
40+
runner_small: ubuntu-latest
41+
run_tests: true
42+
run_vm_tests: true
43+
run_regression_tests: true
44+
publish_manual: true
45+
secrets:
46+
manual_netlify_auth_token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
47+
manual_netlify_site_id: ${{ secrets.NETLIFY_SITE_ID }}
48+
3349
build_x86_64-linux:
3450
uses: ./.github/workflows/build.yml
3551
with:

packaging/secure-packages/flake.lock

Lines changed: 135 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
inputs.nix.url = "../..";
3+
inputs.nix.inputs.nixpkgs.url = "https://flakehub.com/f/DeterminateSystems/secure/0";
4+
5+
outputs = { self, nix }: nix;
6+
}

0 commit comments

Comments
 (0)