on master help sign in
Seem to have finalized everything
commit274e5eeb178d9c2b99841c18aa5bf8aa63bb7293 authoriko <ilyakooo0@gmail.com> dateTue 28 Dec 2021, 11:33 (5 years ago) parent7e41ad8
2 files changed+28−18
.github/workflows/github-actions-image.yaml+23−12 default.nix+5−6
.github/workflows/github-actions-image.yaml+23−12
@@ -21,10 +21,15 @@ jobs:
2121 with:
2222 authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
2323
24+ - name: Test
25+ shell: bash
26+ run: |
27+ $(nix-build -A test -j auto --no-out-link)/bin/compaREST-tests
28+
2429 - name: Build Linux static binary
2530 shell: bash
2631 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
2833
2934 - name: Upload compaREST Linux Binary
3035 uses: actions/upload-artifact@v2
@@ -32,19 +37,19 @@ jobs:
3237 name: compaREST-Linux
3338 path: compaREST
3439
35− - name: Build Github Action Docker Image
40+ - name: Build Docker Images
3641 shell: bash
3742 run: |
38− cp $(nix-build -A compaRESTGithubAction -j auto) compaREST-Github-Action-image.tar.gz
39− cp $(nix-build -A compaRESTImage -j auto) compaREST-image.tar.gz
43+ cp $(nix-build -A compaRESTGithubAction -j auto --no-out-link) compaREST-Github-Action-image.tar.gz
44+ cp $(nix-build -A compaRESTImage -j auto --no-out-link) compaREST-image.tar.gz
4045
41− - name: Upload compaREST Github Action Image
46+ - name: Upload compaREST Docker Github Action Image
4247 uses: actions/upload-artifact@v2
4348 with:
4449 name: compaREST Github Action Docker Image
4550 path: compaREST-Github-Action-image.tar.gz
4651
47− - name: Upload compaREST Image
52+ - name: Upload compaREST Docker Image
4853 uses: actions/upload-artifact@v2
4954 with:
5055 name: compaREST Docker Image
@@ -58,18 +63,24 @@ jobs:
5863 sudo apt-get -y install skopeo
5964
6065 - name: Login to DockerHub
61− if: github.event_name == 'release'
6266 uses: docker/login-action@v1.10.0
6367 with:
6468 username: ${{ secrets.DOCKERHUB_USERNAME }}
6569 password: ${{ secrets.DOCKERHUB_TOKEN }}
6670
67− - name: Push Docker Images to DockerHub
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+
78+ - name: Push Release Docker Images to DockerHub
6879 if: github.event_name == 'release'
6980 shell: bash
7081 run: |
71− skopeo copy docker-archive:$(nix-build -A compaRESTGithubAction -j auto) 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 }}
82+ skopeo copy docker-archive:$(nix-build -A compaRESTGithubAction -j auto --no-out-link) docker://typeable/comparest-github-action:${{ 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 }}
7384
7485 - name: Upload compaREST Github Action Docker Image to release
7586 if: github.event_name == 'release'
@@ -112,7 +123,7 @@ jobs:
112123
113124 - name: Build macOS binary bundle
114125 run: |
115− cp -LR $(nix-build -A macOSCompaRESTBundle -j auto) compaREST
126+ cp -LR $(nix-build -A macOSCompaRESTBundle -j auto --no-out-link) compaREST
116127
117128 - name: Upload macOS compaREST bundle
118129 uses: actions/upload-artifact@v2
@@ -143,7 +154,7 @@ jobs:
143154
144155 - name: Build Windows binary
145156 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
147158
148159 - name: Upload Windows compaREST bundle
149160 uses: actions/upload-artifact@v2
default.nix+5−6
@@ -98,8 +98,6 @@ let
9898
9999 WindowsCompaRESTBin = hsPkgs.projectCross.mingwW64.hsPkgs.compaREST.components.exes.compaREST;
100100in
101−builtins.trace
102− hsPkgs.compaREST.components.exes
103101{
104102 inherit
105103 compaRESTImage
@@ -107,9 +105,10 @@ builtins.trace
107105 compaRESTStaticBin
108106 compaRESTBin
109107 hsPkgs
110−
111108 macOSCompaRESTBundle
112− WindowsCompaRESTBin
113− ;
114− test = hsPkgs.compaREST.components.tests.compaREST-tests;
109+ WindowsCompaRESTBin;
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.
113+ test = hsPkgs.projectCross.musl64.hsPkgs.compaREST.components.tests.compaREST-tests;
115114}