Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
style: changing target to compile-${arch}
Browse files Browse the repository at this point in the history
To keep the consistent format of `${verb}-...` used by all the other targets.
  • Loading branch information
DeveloperC286 committed Sep 16, 2023
1 parent a39a8d1 commit e5fadfb
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 11 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,26 @@ jobs:
uses: actions/checkout@v3
- name: Check module.
run: earthly --ci +check-module-tidying
compiling:
compile-darwin-amd64:
name: Compile Darwin AMD64
runs-on: ubuntu-latest
steps:
- name: Download Earthly v0.7.17.
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.7.17/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: Checkout code.
uses: actions/checkout@v3
- name: Check compiling.
run: earthly --ci +compiling-linux-amd64
- name: Compile Darwin AMD64.
run: earthly --ci +compile-darwin-amd64
compile-linux-amd64:
name: Compile Linux AMD64
runs-on: ubuntu-latest
steps:
- name: Download Earthly v0.7.17.
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.7.17/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: Checkout code.
uses: actions/checkout@v3
- name: Compile Linux AMD64.
run: earthly --ci +compile-linux-amd64
unit-testing:
runs-on: ubuntu-latest
steps:
Expand Down
8 changes: 4 additions & 4 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -183,20 +183,20 @@ fix-module-tidying:
SAVE ARTIFACT "go.sum" AS LOCAL "go.sum"


compiling-linux-amd64:
compile-linux-amd64:
FROM +golang-base
DO +INSTALL_DEPENDENCIES
DO +COPY_SOURCECODE
RUN ./ci/compiling.sh
RUN ./ci/compile.sh
DO +SAVE_OUTPUT


compiling-darwin-amd64:
compile-darwin-amd64:
FROM +golang-base
ENV GOOS=darwin
DO +INSTALL_DEPENDENCIES
DO +COPY_SOURCECODE
RUN ./ci/compiling.sh
RUN ./ci/compile.sh
DO +SAVE_OUTPUT


Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,18 @@ earthly +fix-module-tidying
```

#### Compiling
You can compile the source code into a binary by running the command.
You can compile the source code into a binary for an architecture by running the command.

```sh
earthly +compiling-linux-amd64
earthly +compile-${architecture}
```

or
The available architectures are `linux-amd64` and `darwin-amd64`.

*E.g.*

```sh
earthly +compiling-darwin-amd64
earthly +compile-linux-amd64
```

#### Unit Testing
Expand Down
File renamed without changes.

0 comments on commit e5fadfb

Please sign in to comment.