on master help sign in
Seem to have finalized everything
274e5eeiko
.github/workflows/github-actions-image.yaml+23−12
@@ -21,10 +21,15 @@ jobs:
21 with:
21 with:
22 authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
22 authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
23
23
24+ - name: Test
25+ shell: bash
26+ run: |
27+ $(nix-build -A test -j auto --no-out-link)/bin/compaREST-tests
28+
24 - name: Build Linux static binary
29 - name: Build Linux static binary
25 shell: bash
30 shell: bash
26 run: |
31 run: |
27− cp $(nix-build -A compaRESTStaticBin -j auto)/bin/compaREST compaREST
32+ cp $(nix-build -A compaRESTStaticBin -j auto --no-out-link)/bin/compaREST compaREST
28
33
29 - name: Upload compaREST Linux Binary
34 - name: Upload compaREST Linux Binary
30 uses: actions/upload-artifact@v2
35 uses: actions/upload-artifact@v2
@@ -32,19 +37,19 @@ jobs:
32 name: compaREST-Linux
37 name: compaREST-Linux
33 path: compaREST
38 path: compaREST
34
39
35− - name: Build Github Action Docker Image
40+ - name: Build Docker Images
36 shell: bash
41 shell: bash
37 run: |
42 run: |
38− cp $(nix-build -A compaRESTGithubAction -j auto) compaREST-Github-Action-image.tar.gz
43+ cp $(nix-build -A compaRESTGithubAction -j auto --no-out-link) compaREST-Github-Action-image.tar.gz
39− cp $(nix-build -A compaRESTImage -j auto) compaREST-image.tar.gz
44+ cp $(nix-build -A compaRESTImage -j auto --no-out-link) compaREST-image.tar.gz
40
45
41− - name: Upload compaREST Github Action Image
46+ - name: Upload compaREST Docker Github Action Image
42 uses: actions/upload-artifact@v2
47 uses: actions/upload-artifact@v2
43 with:
48 with:
44 name: compaREST Github Action Docker Image
49 name: compaREST Github Action Docker Image
45 path: compaREST-Github-Action-image.tar.gz
50 path: compaREST-Github-Action-image.tar.gz
46
51
47− - name: Upload compaREST Image
52+ - name: Upload compaREST Docker Image
48 uses: actions/upload-artifact@v2
53 uses: actions/upload-artifact@v2
49 with:
54 with:
50 name: compaREST Docker Image
55 name: compaREST Docker Image
@@ -58,18 +63,24 @@ jobs:
58 sudo apt-get -y install skopeo
63 sudo apt-get -y install skopeo
59
64
60 - name: Login to DockerHub
65 - name: Login to DockerHub
61− if: github.event_name == 'release'
62 uses: docker/login-action@v1.10.0
66 uses: docker/login-action@v1.10.0
63 with:
67 with:
64 username: ${{ secrets.DOCKERHUB_USERNAME }}
68 username: ${{ secrets.DOCKERHUB_USERNAME }}
65 password: ${{ secrets.DOCKERHUB_TOKEN }}
69 password: ${{ secrets.DOCKERHUB_TOKEN }}
66
70
71+ - name: Push Nightly Docker Images to DockerHub
72+ if: github.ref == 'refs/heads/master' && github.event_name == 'push'
73+ shell: bash
74+ run: |
75+ skopeo copy docker-archive:$(nix-build -A compaRESTGithubAction -j auto --no-out-link) docker://typeable/comparest-github-action:nightly
76+ skopeo copy docker-archive:$(nix-build -A compaRESTImage -j auto --no-out-link) docker://typeable/comparest:nightly
77+
67− - name: Push Docker Images to DockerHub
78+ - name: Push Release Docker Images to DockerHub
68 if: github.event_name == 'release'
79 if: github.event_name == 'release'
69 shell: bash
80 shell: bash
70 run: |
81 run: |
71− skopeo copy docker-archive:$(nix-build -A compaRESTGithubAction -j auto) docker://typeable/comparest-github-action:${{ github.event.release.tag_name }}
82+ skopeo copy docker-archive:$(nix-build -A compaRESTGithubAction -j auto --no-out-link) docker://typeable/comparest-github-action:${{ github.event.release.tag_name }}
72− skopeo copy docker-archive:$(nix-build -A compaRESTImage -j auto) docker://typeable/comparest:${{ github.event.release.tag_name }}
83+ skopeo copy docker-archive:$(nix-build -A compaRESTImage -j auto --no-out-link) docker://typeable/comparest:${{ github.event.release.tag_name }}
73
84
74 - name: Upload compaREST Github Action Docker Image to release
85 - name: Upload compaREST Github Action Docker Image to release
75 if: github.event_name == 'release'
86 if: github.event_name == 'release'
@@ -112,7 +123,7 @@ jobs:
112
123
113 - name: Build macOS binary bundle
124 - name: Build macOS binary bundle
114 run: |
125 run: |
115− cp -LR $(nix-build -A macOSCompaRESTBundle -j auto) compaREST
126+ cp -LR $(nix-build -A macOSCompaRESTBundle -j auto --no-out-link) compaREST
116
127
117 - name: Upload macOS compaREST bundle
128 - name: Upload macOS compaREST bundle
118 uses: actions/upload-artifact@v2
129 uses: actions/upload-artifact@v2
@@ -143,7 +154,7 @@ jobs:
143
154
144 - name: Build Windows binary
155 - name: Build Windows binary
145 run: |
156 run: |
146− cp -LR $(nix-build -A WindowsCompaRESTBin -j auto)/bin compaREST
157+ cp -LR $(nix-build -A WindowsCompaRESTBin -j auto --no-out-link)/bin compaREST
147
158
148 - name: Upload Windows compaREST bundle
159 - name: Upload Windows compaREST bundle
149 uses: actions/upload-artifact@v2
160 uses: actions/upload-artifact@v2
default.nix+5−6
@@ -98,8 +98,6 @@ let
98
98
99 WindowsCompaRESTBin = hsPkgs.projectCross.mingwW64.hsPkgs.compaREST.components.exes.compaREST;
99 WindowsCompaRESTBin = hsPkgs.projectCross.mingwW64.hsPkgs.compaREST.components.exes.compaREST;
100in
100in
101−builtins.trace
102− hsPkgs.compaREST.components.exes
103{
101{
104 inherit
102 inherit
105 compaRESTImage
103 compaRESTImage
@@ -107,9 +105,10 @@ builtins.trace
107 compaRESTStaticBin
105 compaRESTStaticBin
108 compaRESTBin
106 compaRESTBin
109 hsPkgs
107 hsPkgs
110−
111 macOSCompaRESTBundle
108 macOSCompaRESTBundle
112− WindowsCompaRESTBin
109+ WindowsCompaRESTBin;
113− ;
110+
111+ # We use the static version so that we don't have to rebuild everything on CI.
112+ # The only binaries build on CI are static.
114− test = hsPkgs.compaREST.components.tests.compaREST-tests;
113+ test = hsPkgs.projectCross.musl64.hsPkgs.compaREST.components.tests.compaREST-tests;
115}
114}