Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(build): #1064 buildjet arm runners #1065

Merged
merged 1 commit into from
Apr 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 34 additions & 4 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ concurrency:
cancel-in-progress: true
group: ${{ github.actor }}
jobs:
deployContainerImage_makesLatest:
deployContainerImage_makesLatestAmd64:
if: ${{ github.repository == 'fluidattacks/makes' }}
runs-on: ubuntu-latest
permissions:
Expand All @@ -16,8 +16,23 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
with:
set-safe-directory: /github/workspace
args: sh -c "nix-env -if . && m . /deployContainerImage/makesLatest"
deployContainerImage_makesPinned:
args: sh -c "nix-env -if . && m . /deployContainerImage/makesLatestAmd64"
deployContainerImage_makesLatestArm64:
if: ${{ github.repository == 'fluidattacks/makes' }}
runs-on: buildjet-2vcpu-ubuntu-2204-arm
permissions:
packages: write
id-token: write
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ github.token }}
with:
set-safe-directory: /github/workspace
args: sh -c "nix-env -if . && m . /deployContainerImage/makesLatestArm64"
deployContainerImage_makesPinnedAmd64:
if: ${{ github.repository == 'fluidattacks/makes' }}
runs-on: ubuntu-latest
permissions:
Expand All @@ -31,7 +46,22 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
with:
set-safe-directory: /github/workspace
args: sh -c "nix-env -if . && m . /deployContainerImage/makesPinned"
args: sh -c "nix-env -if . && m . /deployContainerImage/makesPinnedAmd64"
deployContainerImage_makesPinnedArm64:
if: ${{ github.repository == 'fluidattacks/makes' }}
runs-on: buildjet-2vcpu-ubuntu-2204-arm
permissions:
packages: write
id-token: write
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ github.token }}
with:
set-safe-directory: /github/workspace
args: sh -c "nix-env -if . && m . /deployContainerImage/makesPinnedArm64"
releaseGitHub:
if: ${{ github.repository == 'fluidattacks/makes' }}
runs-on: ubuntu-latest
Expand Down
31 changes: 26 additions & 5 deletions makes.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
__nixpkgs__,
fetchNixpkgs,
inputs,
outputs,
Expand All @@ -26,7 +25,7 @@
};
deployContainerImage = {
images = {
makesLatest = {
makesLatestAmd64 = {
attempts = 3;
credentials = {
token = "GITHUB_TOKEN";
Expand All @@ -35,9 +34,9 @@
registry = "ghcr.io";
src = outputs."/container-image";
sign = true;
tag = "fluidattacks/makes:latest";
tag = "fluidattacks/makes/amd64:latest";
};
makesPinned = {
makesLatestArm64 = {
attempts = 3;
credentials = {
token = "GITHUB_TOKEN";
Expand All @@ -46,7 +45,29 @@
registry = "ghcr.io";
src = outputs."/container-image";
sign = true;
tag = "fluidattacks/makes:23.04";
tag = "fluidattacks/makes/arm64:latest";
};
makesPinnedAmd64 = {
attempts = 3;
credentials = {
token = "GITHUB_TOKEN";
user = "GITHUB_ACTOR";
};
registry = "ghcr.io";
src = outputs."/container-image";
sign = true;
tag = "fluidattacks/makes/amd64:23.04";
};
makesPinnedArm64 = {
attempts = 3;
credentials = {
token = "GITHUB_TOKEN";
user = "GITHUB_ACTOR";
};
registry = "ghcr.io";
src = outputs."/container-image";
sign = true;
tag = "fluidattacks/makes/arm64:23.04";
};
};
};
Expand Down
25 changes: 13 additions & 12 deletions src/args/lint-nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
name,
targets,
...
}: makeScript {
replace = {
__argTargets__ = toBashArray targets;
};
name = "lint-nix-for-${name}";
searchPaths = {
bin = [
__nixpkgs__.statix
];
};
entrypoint = ./entrypoint.sh;
}
}:
makeScript {
replace = {
__argTargets__ = toBashArray targets;
};
name = "lint-nix-for-${name}";
searchPaths = {
bin = [
__nixpkgs__.statix
];
};
entrypoint = ./entrypoint.sh;
}
5 changes: 1 addition & 4 deletions src/evaluator/modules/lint-nix/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
lintNix,
...
}: {
{lintNix, ...}: {
config,
lib,
...
Expand Down