forked from TwentyTwoHW/portal-software
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
81 additions
and
12 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: "Docker Images" | ||
# on: | ||
# push: | ||
# branches: ['master'] | ||
on: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
image: [emulatorImage] #, devEnvironment] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- uses: cachix/install-nix-action@v22 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
- name: Print nixpkgs version | ||
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version' | ||
|
||
- run: nix build .#docker.${{ matrix.image }} | ||
- run: ./result | docker load | ||
|
||
- name: Test | ||
run: | | ||
docker run --rm portal-emulator:latest | ||
# - name: Push Docker image | ||
# uses: docker/build-push-action@v5 | ||
# with: | ||
# context: . | ||
# push: true | ||
# tags: ${{ steps.meta.outputs.tags }} | ||
# labels: ${{ steps.meta.outputs.labels }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ pkgs, packages, getRust }: | ||
|
||
let | ||
qemuOnlyArm = packages.smallQemu; | ||
shell = pkgs.mkShell { | ||
buildInputs = with pkgs; [ cmake pkg-config (getRust { withEmbedded = true; }) ]; | ||
|
||
CC_thumbv7em_none_eabihf = "${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-gcc"; | ||
}; | ||
in | ||
pkgs.dockerTools.buildNixShellImage { | ||
name = "portal-dev-environment"; | ||
tag = "latest"; | ||
homeDirectory = "/app"; | ||
drv = shell; | ||
} |
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
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
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