Skip to content

Commit d4b9d6d

Browse files
committed
Updates to docker configuration for example repository. It now uses the
Adamant base image and adds Pico dependencies on top.
1 parent f86ae4c commit d4b9d6d

32 files changed

+143
-544
lines changed

Diff for: .github/workflows/build_linux.yml

+2-9
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ jobs:
1212
name: build_linux_assembly
1313
runs-on: ubuntu-latest
1414
container:
15-
image: ghcr.io/lasp/adamant:example-latest
16-
env:
17-
INSTALL_DIR: /home/user/env
18-
EXAMPLE_DIR: ${{ github.workspace }}/adamant_example
19-
ADAMANT_DIR: ${{ github.workspace }}/adamant
15+
image: ghcr.io/lasp/adamant_example:latest
2016
steps:
2117
- run: echo "Starting job triggered by a ${{ github.event_name }} event on a ${{ runner.os }} server hosted by GitHub."
2218
- run: echo "Checking out ${{ github.repository }} on branch ${{ github.ref }}."
@@ -31,11 +27,8 @@ jobs:
3127
set-safe-directory: true
3228
repository: lasp/adamant
3329
path: adamant
34-
- name: Get Adamant alire dependencies
35-
run: alr -n build --release && alr -n toolchain --select gnat_native && alr -n toolchain --select gprbuild
36-
working-directory: ${{ env.ADAMANT_DIR }}
3730
- name: Build the Linux binary
38-
run: bash adamant_example/docker/env/github_run.sh "redo adamant_example/src/assembly/linux/main/build/bin/Linux/main.elf"
31+
run: bash adamant_example/env/github_run.sh "redo adamant_example/src/assembly/linux/main/build/bin/Linux/main.elf"
3932
- name: Archive Linux binary
4033
uses: actions/upload-artifact@v3
4134
with:

Diff for: .github/workflows/build_pico.yml

+2-12
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ jobs:
1212
name: build_pico_assembly
1313
runs-on: ubuntu-latest
1414
container:
15-
image: ghcr.io/lasp/adamant:example-latest
16-
env:
17-
INSTALL_DIR: /home/user/env
18-
EXAMPLE_DIR: ${{ github.workspace }}/adamant_example
19-
ADAMANT_DIR: ${{ github.workspace }}/adamant
15+
image: ghcr.io/lasp/adamant_example:latest
2016
steps:
2117
- run: echo "Starting job triggered by a ${{ github.event_name }} event on a ${{ runner.os }} server hosted by GitHub."
2218
- run: echo "Checking out ${{ github.repository }} on branch ${{ github.ref }}."
@@ -31,14 +27,8 @@ jobs:
3127
set-safe-directory: true
3228
repository: lasp/adamant
3329
path: adamant
34-
- name: Get Adamant alire dependencies
35-
run: alr -n build --release && alr -n toolchain --select gnat_native && alr -n toolchain --select gprbuild
36-
working-directory: ${{ env.ADAMANT_DIR }}
37-
- name: Get example alire dependencies
38-
run: alr -n build --release
39-
working-directory: ${{ env.EXAMPLE_DIR }}
4030
- name: Build the Pico binary
41-
run: bash adamant_example/docker/env/github_run.sh "redo adamant_example/src/assembly/pico/main/build/bin/Pico/main.uf2"
31+
run: bash adamant_example/env/github_run.sh "redo adamant_example/src/assembly/pico/main/build/bin/Pico/main.uf2"
4232
- name: Archive Pico binary
4333
uses: actions/upload-artifact@v3
4434
with:

Diff for: .github/workflows/publish_all.yml

+2-12
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ jobs:
1212
name: test_all
1313
runs-on: ubuntu-latest
1414
container:
15-
image: ghcr.io/lasp/adamant:example-latest
16-
env:
17-
INSTALL_DIR: /home/user/env
18-
EXAMPLE_DIR: ${{ github.workspace }}/adamant_example
19-
ADAMANT_DIR: ${{ github.workspace }}/adamant
15+
image: ghcr.io/lasp/adamant_example:latest
2016
steps:
2117
- run: echo "Starting job triggered by a ${{ github.event_name }} event on a ${{ runner.os }} server hosted by GitHub."
2218
- run: echo "Checking out ${{ github.repository }} on branch ${{ github.ref }}."
@@ -31,13 +27,7 @@ jobs:
3127
set-safe-directory: true
3228
repository: lasp/adamant
3329
path: adamant
34-
- name: Get Adamant alire dependencies
35-
run: alr -n build --release && alr -n toolchain --select gnat_native && alr -n toolchain --select gprbuild
36-
working-directory: ${{ env.ADAMANT_DIR }}
37-
- name: Get example alire dependencies
38-
run: alr -n build --release
39-
working-directory: ${{ env.EXAMPLE_DIR }}
4030
- name: Build all documentation
41-
run: bash adamant_example/docker/env/github_run.sh "redo adamant_example/publish"
31+
run: bash adamant_example/env/github_run.sh "redo adamant_example/publish"
4232
- run: echo "Finished with status - ${{ job.status }}."
4333
if: always()

Diff for: .github/workflows/style_all.yml

+2-12
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ jobs:
1212
name: style_all
1313
runs-on: ubuntu-latest
1414
container:
15-
image: ghcr.io/lasp/adamant:example-latest
16-
env:
17-
INSTALL_DIR: /home/user/env
18-
EXAMPLE_DIR: ${{ github.workspace }}/adamant_example
19-
ADAMANT_DIR: ${{ github.workspace }}/adamant
15+
image: ghcr.io/lasp/adamant_example:latest
2016
steps:
2117
- run: echo "Starting job triggered by a ${{ github.event_name }} event on a ${{ runner.os }} server hosted by GitHub."
2218
- run: echo "Checking out ${{ github.repository }} on branch ${{ github.ref }}."
@@ -31,14 +27,8 @@ jobs:
3127
set-safe-directory: true
3228
repository: lasp/adamant
3329
path: adamant
34-
- name: Get Adamant alire dependencies
35-
run: alr -n build --release && alr -n toolchain --select gnat_native && alr -n toolchain --select gprbuild
36-
working-directory: ${{ env.ADAMANT_DIR }}
37-
- name: Get example alire dependencies
38-
run: alr -n build --release
39-
working-directory: ${{ env.EXAMPLE_DIR }}
4030
- name: Check all style
41-
run: bash adamant_example/docker/env/github_run.sh "redo adamant_example/style_all"
31+
run: bash adamant_example/env/github_run.sh "redo adamant_example/style_all"
4232
- name: Archive logs for failed style checks
4333
if: always()
4434
uses: actions/upload-artifact@v3

Diff for: .github/workflows/test_all.yml

+2-12
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ jobs:
1212
name: test_all
1313
runs-on: ubuntu-latest
1414
container:
15-
image: ghcr.io/lasp/adamant:example-latest
16-
env:
17-
INSTALL_DIR: /home/user/env
18-
EXAMPLE_DIR: ${{ github.workspace }}/adamant_example
19-
ADAMANT_DIR: ${{ github.workspace }}/adamant
15+
image: ghcr.io/lasp/adamant_example:latest
2016
steps:
2117
- run: echo "Starting job triggered by a ${{ github.event_name }} event on a ${{ runner.os }} server hosted by GitHub."
2218
- run: echo "Checking out ${{ github.repository }} on branch ${{ github.ref }}."
@@ -31,14 +27,8 @@ jobs:
3127
set-safe-directory: true
3228
repository: lasp/adamant
3329
path: adamant
34-
- name: Get Adamant alire dependencies
35-
run: alr -n build --release && alr -n toolchain --select gnat_native && alr -n toolchain --select gprbuild
36-
working-directory: ${{ env.ADAMANT_DIR }}
37-
- name: Get example alire dependencies
38-
run: alr -n build --release
39-
working-directory: ${{ env.EXAMPLE_DIR }}
4030
- name: Run all unit tests
41-
run: bash adamant_example/docker/env/github_run.sh "redo adamant_example/test_all"
31+
run: bash adamant_example/env/github_run.sh "redo adamant_example/test_all"
4232
- name: Archive logs for failed unit tests
4333
if: always()
4434
uses: actions/upload-artifact@v3

Diff for: clean.do

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

3+
try:
4+
from util import performance
5+
except ModuleNotFoundError:
6+
import sys
7+
sys.stderr.write("Adamant environment not set up! Run:\n source ~/adamant/env/activate\n")
8+
sys.exit(1)
39
# Optimize python path:
4-
from util import performance
510
performance.optimize_path()
611

712
# Imports

Diff for: default.do

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

3+
try:
4+
from util import performance
5+
except ModuleNotFoundError:
6+
import sys
7+
sys.stderr.write("Adamant environment not set up! Run:\n source ~/adamant/env/activate\n")
8+
sys.exit(1)
39
# Optimize python path:
4-
from util import performance
510
performance.optimize_path()
611

712
# Imports
@@ -35,6 +40,8 @@ if __name__ == "__main__":
3540
from rules.build_clean import build_clean as rule_cls
3641
elif base == "clean_all":
3742
from rules.build_clean_all import build_clean_all as rule_cls
43+
elif base == "clear_cache":
44+
from rules.build_clear_cache import build_clear_cache as rule_cls
3845
elif base == "what":
3946
from rules.build_what import build_what as rule_cls
4047
elif base == "prove":

Diff for: default.elf.do

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

3+
try:
4+
from util import performance
5+
except ModuleNotFoundError:
6+
import sys
7+
sys.stderr.write("Adamant environment not set up! Run:\n source ~/adamant/env/activate\n")
8+
sys.exit(1)
39
# Optimize python path:
4-
from util import performance
510
performance.optimize_path()
611

712
# Imports

Diff for: default.eps.do

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

3+
try:
4+
from util import performance
5+
except ModuleNotFoundError:
6+
import sys
7+
sys.stderr.write("Adamant environment not set up! Run:\n source ~/adamant/env/activate\n")
8+
sys.exit(1)
39
# Optimize python path:
4-
from util import performance
510
performance.optimize_path()
611

712
# Imports

Diff for: default.gpr.do

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

3+
try:
4+
from util import performance
5+
except ModuleNotFoundError:
6+
import sys
7+
sys.stderr.write("Adamant environment not set up! Run:\n source ~/adamant/env/activate\n")
8+
sys.exit(1)
39
# Optimize python path:
4-
from util import performance
510
performance.optimize_path()
611

712
# Imports

Diff for: default.o.do

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

3+
try:
4+
from util import performance
5+
except ModuleNotFoundError:
6+
import sys
7+
sys.stderr.write("Adamant environment not set up! Run:\n source ~/adamant/env/activate\n")
8+
sys.exit(1)
39
# Optimize python path:
4-
from util import performance
510
performance.optimize_path()
611

712
# Imports

Diff for: default.pdf.do

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

3+
try:
4+
from util import performance
5+
except ModuleNotFoundError:
6+
import sys
7+
sys.stderr.write("Adamant environment not set up! Run:\n source ~/adamant/env/activate\n")
8+
sys.exit(1)
39
# Optimize python path:
4-
from util import performance
510
performance.optimize_path()
611

712
# Imports

Diff for: default.png.do

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

3+
try:
4+
from util import performance
5+
except ModuleNotFoundError:
6+
import sys
7+
sys.stderr.write("Adamant environment not set up! Run:\n source ~/adamant/env/activate\n")
8+
sys.exit(1)
39
# Optimize python path:
4-
from util import performance
510
performance.optimize_path()
611

712
# Imports

Diff for: default.svg.do

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

3+
try:
4+
from util import performance
5+
except ModuleNotFoundError:
6+
import sys
7+
sys.stderr.write("Adamant environment not set up! Run:\n source ~/adamant/env/activate\n")
8+
sys.exit(1)
39
# Optimize python path:
4-
from util import performance
510
performance.optimize_path()
611

712
# Imports

0 commit comments

Comments
 (0)